From d9e3bb8d4343643504ab7ee6ab943a000065cc8a Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:31:54 +0000 Subject: Remove redundant ServerInstance* fields It has been impossible to have more than one InspIRCd* object in the same address space for some time now, and this feature was never used. This formalizes class InspIRCd as a singleton object. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11703 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/channels.h | 4 ---- include/inspircd.h | 1 + include/mode.h | 5 ----- include/modules.h | 3 --- include/users.h | 6 ------ 5 files changed, 1 insertion(+), 18 deletions(-) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index 7b6999316..fb32f1156 100644 --- a/include/channels.h +++ b/include/channels.h @@ -94,10 +94,6 @@ class CoreExport Channel : public Extensible int maxbans; public: - /** Pointer to creator object - */ - InspIRCd* ServerInstance; - /** Creates a channel record and initialises it with default values * @throw Nothing at present. */ diff --git a/include/inspircd.h b/include/inspircd.h index a7eed47ff..45b219096 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -936,6 +936,7 @@ class CoreExport InspIRCd : public classbase } }; +extern InspIRCd* ServerInstance; ENTRYPOINT; template diff --git a/include/mode.h b/include/mode.h index 0c367a1c2..db115a3c9 100644 --- a/include/mode.h +++ b/include/mode.h @@ -152,7 +152,6 @@ class CoreExport ModeHandler : public classbase int levelrequired; public: - static InspIRCd* ServerInstance; /** Module that created this mode. NULL for core modes */ Module* creator; @@ -425,10 +424,6 @@ typedef std::vector::iterator ModeWatchIter; class CoreExport ModeParser : public classbase { private: - /** - * Creator/owner pointer - */ - InspIRCd* ServerInstance; /** Mode handlers for each mode, to access a handler subtract * 65 from the ascii value of the mode letter. * The upper bit of the value indicates if its a usermode diff --git a/include/modules.h b/include/modules.h index 81381ab8b..4e960ec64 100644 --- a/include/modules.h +++ b/include/modules.h @@ -425,9 +425,6 @@ class ConfigReader; class CoreExport Module : public Extensible { public: - /** Creator/owner pointer - */ - InspIRCd* ServerInstance; /** File that this module was loaded from */ std::string ModuleSourceFile; diff --git a/include/users.h b/include/users.h index f91280139..505c43b9e 100644 --- a/include/users.h +++ b/include/users.h @@ -255,12 +255,6 @@ class CoreExport User : public EventHandler std::bitset<64> AllowedChanModes; public: - /** Pointer to creator. - * This is required to make use of core functions - * from within the User class. - */ - InspIRCd* ServerInstance; - static LocalIntExt NICKForced; static LocalStringExt OperQuit; -- cgit v1.2.3