Revert "users: introduce OnSetClientIP hook."

This reverts commit 5fd31ec5a6ba6021763b36d8d17d4665900623ab.
This commit is contained in:
Robin Burchell 2012-07-01 21:11:59 +02:00
parent 6db09883f2
commit 2c3745edb3
3 changed files with 1 additions and 10 deletions

View File

@ -116,7 +116,7 @@ struct ModResult {
* and numerical comparisons in preprocessor macros if they wish to support * and numerical comparisons in preprocessor macros if they wish to support
* multiple versions of InspIRCd in one file. * multiple versions of InspIRCd in one file.
*/ */
#define INSPIRCD_VERSION_API 2 #define INSPIRCD_VERSION_API 1
/** /**
* This #define allows us to call a method in all * This #define allows us to call a method in all
@ -339,7 +339,6 @@ enum Implementation
I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass, I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass,
I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookIO, 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_OnSetClientIP,
I_END I_END
}; };
@ -1289,11 +1288,6 @@ class CoreExport Module : public classbase, public usecountbase
* @param line The raw line to send; modifiable, if empty no line will be returned. * @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); 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);
}; };

View File

@ -176,7 +176,6 @@ ModResult Module::OnNumeric(User*, unsigned int, const std::string&) { return MO
void Module::OnHookIO(StreamSocket*, ListenSocket*) { } void Module::OnHookIO(StreamSocket*, ListenSocket*) { }
ModResult Module::OnAcceptConnection(int, ListenSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { return MOD_RES_PASSTHRU; } ModResult Module::OnAcceptConnection(int, ListenSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { return MOD_RES_PASSTHRU; }
void Module::OnSendWhoLine(User*, const std::vector<std::string>&, User*, std::string&) { } void Module::OnSendWhoLine(User*, const std::vector<std::string>&, User*, std::string&) { }
void Module::OnSetClientIP(User *) { }
ModuleManager::ModuleManager() : ModCount(0) ModuleManager::ModuleManager() : ModCount(0)
{ {

View File

@ -982,8 +982,6 @@ bool User::SetClientIP(irc::sockets::sockaddrs *sa)
{ {
memcpy(&client_sa, sa, sizeof(irc::sockets::sockaddrs)); memcpy(&client_sa, sa, sizeof(irc::sockets::sockaddrs));
FOREACH_MOD(I_OnSetClientIP, OnSetClientIP(this));
return true; return true;
} }