diff options
author | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-21 03:32:49 +0000 |
---|---|---|
committer | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-21 03:32:49 +0000 |
commit | 55d4d6084e907eba711fedb79c3fc0552f1afc7b (patch) | |
tree | 53cd28c6980ecfdaa844ffbe8ae6b92dbbec2865 /src | |
parent | cbec05c4286b042fa3cd586e132925bbac1a3a7d (diff) |
added 9 new events
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2387 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_register.c | 1 | ||||
-rw-r--r-- | src/nickcore.cpp | 2 | ||||
-rw-r--r-- | src/nickserv.c | 19 | ||||
-rw-r--r-- | src/users.c | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/src/core/ns_register.c b/src/core/ns_register.c index b036a19b8..516aa15c0 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -305,6 +305,7 @@ class CommandNSRegister : public CommandNSConfirm if (email) nr->email = sstrdup(email); nr->requested = time(NULL); + FOREACH_MOD(I_OnMakeNickRequest, OnMakeNickRequest(nr)); if (NSEmailReg) { if (!do_sendregmail(u, nr)) diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 804d0c1c7..0e6d0f5d3 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -1,4 +1,5 @@ #include "services.h" +#include "pseudo.h" NickCore::NickCore() { @@ -74,5 +75,6 @@ void NickCore::EraseAccess(const std::string &entry) void NickCore::ClearAccess() { + FOREACH_MOD(I_OnNickClearAccess, OnNickClearAccess(this)); access.clear(); } diff --git a/src/nickserv.c b/src/nickserv.c index f09cdb9fd..88371b3db 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -851,10 +851,14 @@ 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) + { return nr; + } } return NULL; } @@ -875,12 +879,15 @@ 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) + { return na; + } } - return NULL; } @@ -907,10 +914,14 @@ 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) + { return nc; + } } return NULL; @@ -1070,6 +1081,7 @@ void change_core_display(NickCore * nc, const char *newdisplay) } */ /* Log ... */ + FOREACH_MOD(I_OnChangeCoreDisplay, OnChangeCoreDisplay(nc, newdisplay)); alog("%s: changing %s nickname group display to %s", s_NickServ, nc->display, newdisplay); @@ -1108,6 +1120,8 @@ static int delcore(NickCore * nc) int i; User *user; + FOREACH_MOD(I_OnDelCore, OnDelCore(nc)); + /* Clean up this nick core from any users online using it * (ones that /nick but remain unidentified) */ @@ -1171,6 +1185,7 @@ int delnickrequest(NickRequest * nr) { if (nr) { + FOREACH_MOD(I_OnDelNickRequest, OnDelNickRequest(nr)); nrlists[HASH(nr->nick)] = nr->next; if (nr->nick) delete [] nr->nick; @@ -1201,6 +1216,8 @@ int delnick(NickAlias * na) NickServCollide::ClearTimers(na); NickServRelease::ClearTimers(na, true); + FOREACH_MOD(I_OnDelNick, OnDelNick(na)); + /* Second thing to do: look for an user using the alias * being deleted, and make appropriate changes */ if ((u = finduser(na->nick))) diff --git a/src/users.c b/src/users.c index fd9d25549..e0312f5f3 100644 --- a/src/users.c +++ b/src/users.c @@ -227,7 +227,7 @@ User::~User() delete [] srealname; } - FOREACH_MOD(I_OnUserLogoff, OnUserLogoff(this->nick)); + FOREACH_MOD(I_OnUserLogoff, OnUserLogoff(this)); if (debug >= 2) alog("debug: User::~User() called"); |