diff options
author | Adam <Adam@anope.org> | 2013-05-27 19:36:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-27 19:36:37 -0400 |
commit | 37b3535543b81c3d75c8f62b83d422f0d2fbced0 (patch) | |
tree | 8a062415c91d352e4b6bd180cbf238d1f159802d /modules/pseudoclients/nickserv.cpp | |
parent | c21e8d9204f9b671177a63d4daa21957bffc1d9f (diff) |
Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
Diffstat (limited to 'modules/pseudoclients/nickserv.cpp')
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 642b22f2d..2e80211b0 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -114,10 +114,6 @@ class NickServCore : public Module, public NickServService public: NickServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), NickServService(this) { - Implementation i[] = { I_OnReload, I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickIdentify, I_OnNickGroup, - I_OnNickUpdate, I_OnUserConnect, I_OnPostUserLogoff, I_OnServerSync, I_OnUserNickChange, I_OnPreHelp, I_OnPostHelp, - I_OnNickCoreCreate, I_OnUserQuit, I_OnExpireTick, I_OnUserLogin }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void Validate(User *u) anope_override @@ -285,7 +281,7 @@ class NickServCore : public Module, public NickServService IRCD->SendLogout(user); user->RemoveMode(NickServ, "REGISTERED"); user->Logout(); - FOREACH_MOD(I_OnNickLogout, OnNickLogout(user)); + FOREACH_MOD(OnNickLogout, (user)); } nc->users.clear(); } @@ -510,7 +506,7 @@ class NickServCore : public Module, public NickServService if (na->HasExt("NO_EXPIRE")) expire = false; - FOREACH_MOD(I_OnPreNickExpire, OnPreNickExpire(na, expire)); + FOREACH_MOD(OnPreNickExpire, (na, expire)); if (expire) { @@ -518,7 +514,7 @@ class NickServCore : public Module, public NickServService if (na->nc->HasExt("SUSPENDED")) extra = "suspended "; Log(LOG_NORMAL, "expire") << "Expiring " << extra << "nickname " << na->nick << " (group: " << na->nc->display << ") (e-mail: " << (na->nc->email.empty() ? "none" : na->nc->email) << ")"; - FOREACH_MOD(I_OnNickExpire, OnNickExpire(na)); + FOREACH_MOD(OnNickExpire, (na)); delete na; } } |