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/commands/ns_suspend.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/commands/ns_suspend.cpp')
-rw-r--r-- | modules/commands/ns_suspend.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp index eadb35d7d..0db7cd951 100644 --- a/modules/commands/ns_suspend.cpp +++ b/modules/commands/ns_suspend.cpp @@ -94,7 +94,7 @@ class CommandNSSuspend : public Command Log(LOG_ADMIN, source, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never"); source.Reply(_("Nick %s is now suspended."), nick.c_str()); - FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na)); + FOREACH_MOD(OnNickSuspend, (na)); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override @@ -150,7 +150,7 @@ class CommandNSUnSuspend : public Command Log(LOG_ADMIN, source, this) << "for " << na->nick; source.Reply(_("Nick %s is now released."), nick.c_str()); - FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na)); + FOREACH_MOD(OnNickUnsuspended, (na)); return; } @@ -173,8 +173,6 @@ class NSSuspend : public Module NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandnssuspend(this), commandnsunsuspend(this) { - Implementation i[] = { I_OnPreNickExpire, I_OnNickInfo }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) anope_override |