diff options
Diffstat (limited to 'modules/pseudoclients')
-rw-r--r-- | modules/pseudoclients/botserv.cpp | 11 | ||||
-rw-r--r-- | modules/pseudoclients/chanserv.cpp | 9 | ||||
-rw-r--r-- | modules/pseudoclients/global.cpp | 2 | ||||
-rw-r--r-- | modules/pseudoclients/hostserv.cpp | 5 | ||||
-rw-r--r-- | modules/pseudoclients/memoserv.cpp | 4 | ||||
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 10 | ||||
-rw-r--r-- | modules/pseudoclients/operserv.cpp | 2 |
7 files changed, 10 insertions, 33 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 828f3b0e2..8322ad3c3 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -18,9 +18,6 @@ class BotServCore : public Module public: BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) { - Implementation i[] = { I_OnReload, I_OnSetCorrectModes, I_OnBotAssign, I_OnPrivmsg, I_OnJoinChannel, I_OnLeaveChannel, - I_OnPreHelp, I_OnPostHelp, I_OnChannelModeSet, I_OnCreateChan, I_OnUserKicked, I_OnCreateBot }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnReload(Configuration::Conf *conf) anope_override @@ -148,11 +145,11 @@ class BotServCore : public Module EventReturn MOD_RESULT; if (c->ci->AccessFor(u).HasPriv("FANTASIA")) { - FOREACH_RESULT(I_OnBotFantasy, OnBotFantasy(source, cmd, c->ci, params)); + FOREACH_RESULT(OnBotFantasy, MOD_RESULT, (source, cmd, c->ci, params)); } else { - FOREACH_RESULT(I_OnBotNoFantasyAccess, OnBotNoFantasyAccess(source, cmd, c->ci, params)); + FOREACH_RESULT(OnBotNoFantasyAccess, MOD_RESULT, (source, cmd, c->ci, params)); } if (MOD_RESULT == EVENT_STOP || !c->ci->AccessFor(u).HasPriv("FANTASIA")) @@ -161,7 +158,7 @@ class BotServCore : public Module if (MOD_RESULT != EVENT_ALLOW && !info.permission.empty() && !source.HasCommand(info.permission)) return; - FOREACH_RESULT(I_OnPreCommand, OnPreCommand(source, cmd, params)); + FOREACH_RESULT(OnPreCommand, MOD_RESULT, (source, cmd, params)); if (MOD_RESULT == EVENT_STOP) return; @@ -169,7 +166,7 @@ class BotServCore : public Module cmd->Execute(source, params); if (!nc_reference) source.nc = NULL; - FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, cmd, params)); + FOREACH_MOD(OnPostCommand, (source, cmd, params)); } void OnJoinChannel(User *user, Channel *c) anope_override diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 5a1fed00b..116d5a5ac 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -20,11 +20,6 @@ class ChanServCore : public Module, public ChanServService ChanServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), ChanServService(this) { - Implementation i[] = { I_OnReload, I_OnBotDelete, I_OnBotPrivmsg, I_OnDelCore, - I_OnPreHelp, I_OnPostHelp, I_OnCheckModes, I_OnCreateChan, I_OnCanSet, - I_OnChannelSync, I_OnBotKick, I_OnExpireTick, I_OnCheckDelete, I_OnPreUplinkSync, - I_OnChanRegistered, I_OnTopicUpdated }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void Hold(Channel *c) anope_override @@ -360,7 +355,7 @@ class ChanServCore : public Module, public ChanServService if (ci->HasExt("NO_EXPIRE")) expire = false; - FOREACH_MOD(I_OnPreChanExpire, OnPreChanExpire(ci, expire)); + FOREACH_MOD(OnPreChanExpire, (ci, expire)); if (expire) { @@ -369,7 +364,7 @@ class ChanServCore : public Module, public ChanServService extra = "suspended "; Log(LOG_NORMAL, "chanserv/expire") << "Expiring " << extra << "channel " << ci->name << " (founder: " << (ci->GetFounder() ? ci->GetFounder()->display : "(none)") << ")"; - FOREACH_MOD(I_OnChanExpire, OnChanExpire(ci)); + FOREACH_MOD(OnChanExpire, (ci)); delete ci; } } diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index 224cbeea1..1500ebb17 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -27,8 +27,6 @@ class GlobalCore : public Module, public GlobalService GlobalCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), GlobalService(this) { - Implementation i[] = { I_OnReload, I_OnRestart, I_OnShutdown, I_OnNewServer, I_OnPreHelp }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) anope_override diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index 7c98c7344..31b623895 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -17,13 +17,8 @@ class HostServCore : public Module public: HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) { - if (!IRCD || !IRCD->CanSetVHost) throw ModuleException("Your IRCd does not support vhosts"); - - Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnNickUpdate, I_OnPreHelp, - I_OnSetVhost, I_OnDeleteVhost }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnReload(Configuration::Conf *conf) anope_override diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp index 5136e2af0..e2fa0b0d1 100644 --- a/modules/pseudoclients/memoserv.cpp +++ b/modules/pseudoclients/memoserv.cpp @@ -39,8 +39,6 @@ class MemoServCore : public Module, public MemoServService MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), MemoServService(this) { - Implementation i[] = { I_OnNickCoreCreate, I_OnCreateChan, I_OnReload, I_OnBotDelete, I_OnNickIdentify, I_OnJoinChannel, I_OnUserAway, I_OnNickUpdate, I_OnPreHelp, I_OnPostHelp }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) anope_override @@ -76,7 +74,7 @@ class MemoServCore : public Module, public MemoServService m->text = message; m->unread = true; - FOREACH_MOD(I_OnMemoSend, OnMemoSend(source, target, mi, m)); + FOREACH_MOD(OnMemoSend, (source, target, mi, m)); if (ischan) { 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; } } diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 85984327c..e0d3ea979 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -159,8 +159,6 @@ class OperServCore : public Module OperServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR), sglines(this), sqlines(this), snlines(this) { - Implementation i[] = { I_OnReload, I_OnBotPrivmsg, I_OnServerQuit, I_OnUserModeSet, I_OnUserModeUnset, I_OnUserConnect, I_OnUserNickChange, I_OnPreHelp, I_OnLog }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); /* Yes, these are in this order for a reason. Most violent->least violent. */ XLineManager::RegisterXLineManager(&sglines); |