diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-01 19:53:37 +0200 |
---|---|---|
committer | Robin Burchell <robin+git@viroteck.net> | 2012-07-01 21:07:22 +0200 |
commit | a17421dca39d4afabf7143797baa6e13a19a5a97 (patch) | |
tree | e399d5e2133f1cf92ea2908a486594db036d4bb1 /src | |
parent | 37d7160b3a2434abcb4b39898bb86fa314fc3e5b (diff) |
m_callerid, m_dccallow Use OnUserPostNick hook instead of OnUserPreNick
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_callerid.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_dccallow.cpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index a8a81daef..86b6d8d3c 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -337,7 +337,7 @@ public: ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.extInfo); - Implementation eventlist[] = { I_OnRehash, I_OnUserPreNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage }; + Implementation eventlist[] = { I_OnRehash, I_OnUserPostNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage }; ServerInstance->Modules->Attach(eventlist, this, 6); } @@ -399,11 +399,10 @@ public: return MOD_RES_PASSTHRU; } - ModResult OnUserPreNick(User* user, const std::string& newnick) + void OnUserPostNick(User* user, const std::string& oldnick) { if (!tracknick) RemoveFromAllAccepts(user); - return MOD_RES_PASSTHRU; } void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 0ec8fb395..0cea96154 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -257,7 +257,7 @@ class ModuleDCCAllow : public Module ServerInstance->Extensions.Register(ext); ServerInstance->AddCommand(&cmd); ReadFileConf(); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, I_OnUserPreNick, I_OnRehash }; + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, I_OnUserPostNick, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, 5); } @@ -284,10 +284,9 @@ class ModuleDCCAllow : public Module RemoveNick(user); } - virtual ModResult OnUserPreNick(User* user, const std::string &newnick) + virtual void OnUserPostNick(User* user, const std::string &oldnick) { RemoveNick(user); - return MOD_RES_PASSTHRU; } virtual ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list) |