]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
Move static map of extensions into ServerInstance, add const-correctness
[user/henk/code/inspircd.git] / include / inspircd.h
index a5e40102a45e3ad62f276ef805d2830c402eaffc..df80ba4bfc425d0eb39e29f3ca21fa0522b40e5e 100644 (file)
@@ -74,7 +74,7 @@ typedef std::vector< KeyVal > KeyValList;
 typedef std::multimap< std::string, KeyValList > ConfigDataHash;
 
 class InspIRCd;
-extern InspIRCd* ServerInstance;
+CoreExport extern InspIRCd* ServerInstance;
 
 #include "inspircd_config.h"
 #include "inspircd_version.h"
@@ -421,10 +421,6 @@ class CoreExport InspIRCd : public classbase
         */
        void BuildISupport();
 
-       /** List of server names we've seen.
-        */
-       servernamelist servernames;
-
        /** Time this ircd was booted
         */
        time_t startup_time;
@@ -433,6 +429,8 @@ class CoreExport InspIRCd : public classbase
         */
        std::string ConfigFileName;
 
+       ExtensionManager Extensions;
+
        /** Mode handler, handles mode setting and removal
         */
        ModeParser* Modes;
@@ -512,6 +510,14 @@ class CoreExport InspIRCd : public classbase
         */
        ProtocolInterface* PI;
 
+       /** Holds extensible for user nickforced
+        */
+       LocalIntExt NICKForced;
+
+       /** Holds extensible for user operquit
+        */
+       LocalStringExt OperQuit;
+
        /** Get the current time
         * Because this only calls time() once every time around the mainloop,
         * it is much faster than calling time() directly.
@@ -532,24 +538,6 @@ class CoreExport InspIRCd : public classbase
         */
        bool BindSocket(int sockfd, int port, const char* addr, bool dolisten = true);
 
-       /** Adds a server name to the list of servers we've seen
-        * @param The servername to add
-        */
-       void AddServerName(const std::string &servername);
-
-       /** Finds a cached char* pointer of a server name,
-        * This is used to optimize User by storing only the pointer to the name
-        * @param The servername to find
-        * @return A pointer to this name, gauranteed to never become invalid
-        */
-       const char* FindServerNamePtr(const std::string &servername);
-
-       /** Returns true if we've seen the given server name before
-        * @param The servername to find
-        * @return True if we've seen this server name before
-        */
-       bool FindServerName(const std::string &servername);
-
        /** Gets the GECOS (description) field of the given server.
         * If the servername is not that of the local server, the name
         * is passed to handling modules which will attempt to determine
@@ -557,7 +545,7 @@ class CoreExport InspIRCd : public classbase
         * @param servername The servername to find the description of
         * @return The description of this server, or of the local server
         */
-       std::string GetServerDescription(const char* servername);
+       std::string GetServerDescription(const std::string& servername);
 
        /** Find a user in the nick hash.
         * If the user cant be found in the nick hash check the uuid hash
@@ -741,12 +729,6 @@ class CoreExport InspIRCd : public classbase
         */
        void RehashServer();
 
-       /** Return the channel whos index number matches that provided
-        * @param The index number of the channel to fetch
-        * @return A channel record, or NUll if index < 0 or index >= InspIRCd::ChannelCount()
-        */
-       Channel* GetChannelIndex(long index);
-
        /** Dump text to a user target, splitting it appropriately to fit
         * @param User the user to dump the text to
         * @param LinePrefix text to prefix each complete line with
@@ -810,12 +792,12 @@ class CoreExport InspIRCd : public classbase
         * @param server The server to check for uline status
         * @return True if the server is a uline OR the string is empty
         */
-       bool ULine(const char* server);
+       bool ULine(const std::string& server);
 
        /** Returns true if the uline is 'silent' (doesnt generate
         * remote connect notices etc).
         */
-       bool SilentULine(const char* server);
+       bool SilentULine(const std::string& server);
 
        /** Returns the subversion revision ID of this ircd
         * @return The revision ID or an empty string
@@ -933,7 +915,7 @@ class CommandModule : public Module
 
        Version GetVersion()
        {
-               return Version(cmd.command, VF_VENDOR);
+               return Version(cmd.command, VF_VENDOR|VF_CORE);
        }
 };