]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
New API version
[user/henk/code/inspircd.git] / include / modules.h
index 49c16ae6115ab549faee1e3ec72420b2e9c084d5..68ac9cb6c4610528c06238549202def8a0cc012a 100644 (file)
@@ -109,7 +109,7 @@ struct ModResult {
 /** InspIRCd major version.
  * 1.2 -> 102; 2.1 -> 201; 2.12 -> 212
  */
-#define INSPIRCD_VERSION_MAJ 200
+#define INSPIRCD_VERSION_MAJ 202
 /** InspIRCd API version.
  * If you change any API elements, increment this value. This counter should be
  * reset whenever the major version is changed. Modules can use these two values
@@ -338,7 +338,7 @@ enum Implementation
        I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnPostCommand, I_OnPostJoin,
        I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass,
        I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookIO,
-       I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent,
+       I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent, I_OnSetUserIP,
        I_END
 };
 
@@ -1288,6 +1288,12 @@ class CoreExport Module : public classbase, public usecountbase
         * @param line The raw line to send; modifiable, if empty no line will be returned.
         */
        virtual void OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, std::string& line);
+
+       /** 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.
+        * @param user The user whose IP is being set
+        */
+       virtual void OnSetUserIP(LocalUser* user);
 };
 
 
@@ -1690,7 +1696,7 @@ struct AllModuleList {
  * and functions needed to make a module loadable by the OS.
  * It defines the class factory and external init_module function.
  */
-#ifdef WINDOWS
+#ifdef _WIN32
 
 #define MODULE_INIT(y) \
        extern "C" DllExport Module * MODULE_INIT_SYM() \