mirror of
https://github.com/anope/anope.git
synced 2026-07-06 02:33:13 +02:00
Removed the OnFind events, they are not necessary anymore and just waste CPU
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2872 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+2
-21
@@ -991,25 +991,11 @@ class CoreExport Module
|
||||
*/
|
||||
virtual void OnNickUnsuspended(NickAlias *na) { }
|
||||
|
||||
/** Called on finduser()
|
||||
* @param u pointer to the user
|
||||
*/
|
||||
virtual void OnFindUser(User *u) { }
|
||||
/** Called on findnick()
|
||||
* @param nick nickname to be searched for
|
||||
*/
|
||||
virtual void OnFindNick(const std::string &nick) { }
|
||||
|
||||
/** Called on delnick()
|
||||
* @ param na pointer to the nickalias
|
||||
*/
|
||||
virtual void OnDelNick(NickAlias *na) { }
|
||||
|
||||
/** Called on findcore()
|
||||
* @param nick nickname to be searched for (nc->display)
|
||||
*/
|
||||
virtual void OnFindCore(const std::string &nick) { }
|
||||
|
||||
/** Called on delcore()
|
||||
* @param nc pointer to the NickCore
|
||||
*/
|
||||
@@ -1021,11 +1007,6 @@ class CoreExport Module
|
||||
*/
|
||||
virtual void OnChangeCoreDisplay(NickCore *nc, const std::string &newdisplay) { }
|
||||
|
||||
/** Called on findrequestnick()
|
||||
* @param nick nicname to be searched for
|
||||
*/
|
||||
virtual void OnFindRequestNick(const std::string &nick) { }
|
||||
|
||||
/** called from ns_register.c, after the NickRequest have been created
|
||||
* @param nr pointer to the NickRequest
|
||||
*/
|
||||
@@ -1175,8 +1156,8 @@ enum Implementation
|
||||
/* NickServ */
|
||||
I_OnNickServHelp, I_OnPreNickExpire, I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop,
|
||||
I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended,
|
||||
I_OnFindUser, I_OnFindNick, I_OnDelNick, I_OnFindCore, I_OnDelCore, I_OnChangeCoreDisplay,
|
||||
I_OnFindRequestNick, I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess,
|
||||
I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay,
|
||||
I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess,
|
||||
|
||||
/* ChanServ */
|
||||
I_OnChanServHelp, I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnPreChanExpire, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange,
|
||||
|
||||
+2
-2
@@ -426,8 +426,8 @@ void StackerInfo::AddMode(void *Mode, bool Set, const std::string &Param)
|
||||
otherlist = &AddModes;
|
||||
}
|
||||
|
||||
/* Note that this whole thing works fine with status and list modes, because those have paramaters
|
||||
* which make them not unique.
|
||||
/* Note that this whole thing works fine with status and list modes, because those have parameters
|
||||
* which make them unique.
|
||||
*/
|
||||
it = std::find(list->begin(), list->end(), std::make_pair(Mode, Param));
|
||||
if (it != list->end())
|
||||
|
||||
@@ -451,8 +451,6 @@ NickRequest *findrequestnick(const char *nick)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnFindRequestNick, OnFindRequestNick(nick));
|
||||
|
||||
for (nr = nrlists[HASH(nick)]; nr; nr = nr->next)
|
||||
{
|
||||
if (stricmp(nr->nick, nick) == 0)
|
||||
@@ -476,8 +474,6 @@ NickAlias *findnick(const char *nick)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnFindNick, OnFindNick(nick));
|
||||
|
||||
for (na = nalists[HASH(nick)]; na; na = na->next)
|
||||
{
|
||||
if (stricmp(na->nick, nick) == 0)
|
||||
@@ -508,8 +504,6 @@ NickCore *findcore(const char *nick)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FOREACH_MOD(I_OnFindCore, OnFindCore(nick));
|
||||
|
||||
for (nc = nclists[HASH(nick)]; nc; nc = nc->next)
|
||||
{
|
||||
if (stricmp(nc->display, nick) == 0)
|
||||
|
||||
@@ -476,7 +476,6 @@ User *finduser(const std::string &nick)
|
||||
while (user && ci_nick != user->nick)
|
||||
user = user->next;
|
||||
Alog(LOG_DEBUG_3) << "finduser(" << nick << ") -> " << static_cast<void *>(user);
|
||||
FOREACH_MOD(I_OnFindUser, OnFindUser(user));
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -691,7 +690,6 @@ User *find_byuid(const std::string &uid)
|
||||
while (u) {
|
||||
next = next_uid();
|
||||
if (u->GetUID() == uid) {
|
||||
FOREACH_MOD(I_OnFindUser, OnFindUser(u));
|
||||
return u;
|
||||
}
|
||||
u = next;
|
||||
|
||||
Reference in New Issue
Block a user