diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 8 | ||||
-rw-r--r-- | include/users.h | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index b428a5f8d..7cd6bbeab 100644 --- a/include/modules.h +++ b/include/modules.h @@ -116,7 +116,7 @@ struct ModResult { * and numerical comparisons in preprocessor macros if they wish to support * multiple versions of InspIRCd in one file. */ -#define INSPIRCD_VERSION_API 1 +#define INSPIRCD_VERSION_API 2 /** * This #define allows us to call a method in all @@ -339,6 +339,7 @@ enum Implementation 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_OnSetClientIP, I_END }; @@ -1288,6 +1289,11 @@ 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 User's ip changes. + * @param user The user whose ip changed. + */ + virtual void OnSetClientIP(User *user); }; diff --git a/include/users.h b/include/users.h index 56297bed8..cdc0d8078 100644 --- a/include/users.h +++ b/include/users.h @@ -394,6 +394,11 @@ class CoreExport User : public Extensible */ bool SetClientIP(const char* sip); + /** Sets the client IP for this user + * @return true always + */ + bool SetClientIP(irc::sockets::sockaddrs *sa); + /** Constructor * @throw CoreException if the UID allocated to the user already exists */ |