]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser()...
[user/henk/code/inspircd.git] / include / modules.h
index 49c16ae6115ab549faee1e3ec72420b2e9c084d5..626f6e9b821571fbed98933c9f2e0dc0625e8429 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
 };
 
@@ -509,7 +509,7 @@ class CoreExport Module : public classbase, public usecountbase
         * @param keygiven The key given to join the channel, or an empty string if none was provided
         * @return 1 To prevent the join, 0 to allow it.
         */
-       virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven);
+       virtual ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven);
 
        /** Called whenever a user is about to be kicked.
         * Returning a value of 1 from this function stops the process immediately, causing no
@@ -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() \