]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Store config values in a map instead of a unique vector of pairs.
[user/henk/code/inspircd.git] / include / modules.h
index a349a5d2a3576f3cc989c2d57d5440fabb69cbae..5deed943a786062e65af81cfa4d2ff87459e93a5 100644 (file)
@@ -201,8 +201,6 @@ class CoreExport Version
 
        /** Complex version information, including linking compatability data */
        Version(const std::string &desc, int flags, const std::string& linkdata);
-
-       virtual ~Version() {}
 };
 
 class CoreExport DataProvider : public ServiceProvider
@@ -990,10 +988,10 @@ class CoreExport Module : public classbase, public usecountbase
         * @param params The parameters to the /WHO query
         * @param user The user that this line of the query is about
         * @param memb The member shown in this line, NULL if no channel is in this line
-        * @param line The raw line to send; modifiable.
+        * @param numeric Numeric to send; modifiable.
         * @param Return MOD_RES_PASSTHRU to allow the line to be displayed, MOD_RES_DENY to hide it
         */
-       virtual ModResult OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, Membership* memb, std::string& line);
+       virtual ModResult OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, Membership* memb, Numeric::Numeric& numeric);
 
        /** Called whenever a local user's IP is set for the first time, or when a local user's IP changes due to
         * a module like m_cgiirc changing it.
@@ -1006,10 +1004,6 @@ class CoreExport Module : public classbase, public usecountbase
  */
 typedef std::vector<Module*> IntModuleList;
 
-/** An event handler iterator
- */
-typedef IntModuleList::iterator EventHandlerIter;
-
 /** ModuleManager takes care of all things module-related
  * in the core.
  */
@@ -1043,6 +1037,12 @@ class CoreExport ModuleManager : public fakederef<ModuleManager>
         */
        bool PrioritizeHooks();
 
+       /** Unregister all user modes or all channel modes owned by a module
+        * @param mod Module whose modes to unregister
+        * @param modetype MODETYPE_USER to unregister user modes, MODETYPE_CHANNEL to unregister channel modes
+        */
+       void UnregisterModes(Module* mod, ModeType modetype);
+
  public:
        typedef std::map<std::string, Module*> ModuleMap;
 
@@ -1235,7 +1235,7 @@ class CoreExport ModuleManager : public fakederef<ModuleManager>
 #define MODULE_INIT_SYM_FN_2(x,y) MODULE_INIT_SYM_FN_1(x,y)
 #define MODULE_INIT_SYM_FN_1(x,y) inspircd_module_ ## x ## _ ## y
 
-#ifdef PURE_STATIC
+#ifdef INSPIRCD_STATIC
 
 struct AllCommandList {
        typedef Command* (*fn)(Module*);
@@ -1277,7 +1277,7 @@ struct AllModuleList {
                } \
                return TRUE; \
        } \
-       extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION " " INSPIRCD_REVISION;
+       extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION;
 
 #else
 
@@ -1286,7 +1286,7 @@ struct AllModuleList {
        { \
                return new y; \
        } \
-       extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION " " INSPIRCD_REVISION;
+       extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION;
 #endif
 
 #define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)