diff options
author | Adam <Adam@anope.org> | 2013-06-26 17:01:33 -0400 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-08-04 16:08:57 +0200 |
commit | 8710724b5518ae9858309e548514f76e620a8459 (patch) | |
tree | cb4efb99580cb8957353848a9dc34d5a83ab172e /src/commands | |
parent | 36f93c0e7f8a980943237b0b28138ade86f5e573 (diff) |
Change the syntax of FOREACH macros to be less dumb.
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_info.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_invite.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_privmsg.cpp | 12 | ||||
-rw-r--r-- | src/commands/cmd_rehash.cpp | 6 | ||||
-rw-r--r-- | src/commands/cmd_who.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_whois.cpp | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/commands/cmd_info.cpp b/src/commands/cmd_info.cpp index 6e5f2a909..b3f146c30 100644 --- a/src/commands/cmd_info.cpp +++ b/src/commands/cmd_info.cpp @@ -100,7 +100,7 @@ CmdResult CommandInfo::Handle (const std::vector<std::string>& parameters, User int i=0; while (lines[i]) user->SendText(":%s %03d %s :%s", ServerInstance->Config->ServerName.c_str(), RPL_INFO, user->nick.c_str(), lines[i++]); - FOREACH_MOD(I_OnInfo,OnInfo(user)); + FOREACH_MOD(OnInfo, (user)); user->SendText(":%s %03d %s :End of /INFO list", ServerInstance->Config->ServerName.c_str(), RPL_ENDOFINFO, user->nick.c_str()); return CMD_SUCCESS; } diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index 355bde9e6..2ed05c550 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -143,7 +143,7 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use } c->WriteAllExceptSender(user, true, prefix, "NOTICE %s :*** %s invited %s into the channel", c->name.c_str(), user->nick.c_str(), u->nick.c_str()); } - FOREACH_MOD(I_OnUserInvite,OnUserInvite(user,u,c,timeout)); + FOREACH_MOD(OnUserInvite, (user,u,c,timeout)); } else if (IS_LOCAL(user)) { diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp index 5519be2fa..ed98c771f 100644 --- a/src/commands/cmd_privmsg.cpp +++ b/src/commands/cmd_privmsg.cpp @@ -84,12 +84,12 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para const char* text = temp.c_str(); const char* servermask = (parameters[0].c_str()) + 1; - FOREACH_MOD(I_OnText,OnText(user, (void*)parameters[0].c_str(), TYPE_SERVER, text, 0, except_list)); + FOREACH_MOD(OnText, (user, (void*)parameters[0].c_str(), TYPE_SERVER, text, 0, except_list)); if (InspIRCd::Match(ServerInstance->Config->ServerName, servermask, NULL)) { user->SendAll(MessageTypeString[mt], "%s", text); } - FOREACH_MOD(I_OnUserMessage,OnUserMessage(user, (void*)parameters[0].c_str(), TYPE_SERVER, text, 0, except_list, mt)); + FOREACH_MOD(OnUserMessage, (user, (void*)parameters[0].c_str(), TYPE_SERVER, text, 0, except_list, mt)); return CMD_SUCCESS; } char status = 0; @@ -147,7 +147,7 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para return CMD_FAILURE; } - FOREACH_MOD(I_OnText,OnText(user,chan,TYPE_CHANNEL,text,status,except_list)); + FOREACH_MOD(OnText, (user,chan,TYPE_CHANNEL,text,status,except_list)); if (status) { @@ -165,7 +165,7 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para chan->WriteAllExcept(user, false, status, except_list, "%s %s :%s", MessageTypeString[mt], chan->name.c_str(), text); } - FOREACH_MOD(I_OnUserMessage, OnUserMessage(user,chan, TYPE_CHANNEL, text, status, except_list, mt)); + FOREACH_MOD(OnUserMessage, (user,chan, TYPE_CHANNEL, text, status, except_list, mt)); } else { @@ -224,7 +224,7 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para const char* text = temp.c_str(); - FOREACH_MOD(I_OnText,OnText(user, dest, TYPE_USER, text, 0, except_list)); + FOREACH_MOD(OnText, (user, dest, TYPE_USER, text, 0, except_list)); if (IS_LOCAL(dest)) { @@ -232,7 +232,7 @@ CmdResult MessageCommandBase::HandleMessage(const std::vector<std::string>& para user->WriteTo(dest, "%s %s :%s", MessageTypeString[mt], dest->nick.c_str(), text); } - FOREACH_MOD(I_OnUserMessage,OnUserMessage(user, dest, TYPE_USER, text, 0, except_list, mt)); + FOREACH_MOD(OnUserMessage, (user, dest, TYPE_USER, text, 0, except_list, mt)); } else { diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp index 923bfe129..3dc454036 100644 --- a/src/commands/cmd_rehash.cpp +++ b/src/commands/cmd_rehash.cpp @@ -45,7 +45,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use { std::string param = parameters.size() ? parameters[0] : ""; - FOREACH_MOD(I_OnPreRehash,OnPreRehash(user, param)); + FOREACH_MOD(OnPreRehash, (user, param)); if (param.empty()) { @@ -68,7 +68,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use if (param[0] == '-') param = param.substr(1); - FOREACH_MOD(I_OnModuleRehash,OnModuleRehash(user, param)); + FOREACH_MOD(OnModuleRehash, (user, param)); return CMD_SUCCESS; } @@ -88,7 +88,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use /* Don't do anything with the logs here -- logs are restarted * after the config thread has completed. */ - FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect()); + FOREACH_MOD(OnGarbageCollect, ()); ServerInstance->ConfigThread = new ConfigReaderThread(user->uuid); diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index 302393927..5e0e55b66 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -229,7 +229,7 @@ void CommandWho::SendWhoLine(User* user, const std::vector<std::string>& parms, wholine.append(" :0 " + u->fullname); - FOREACH_MOD(I_OnSendWhoLine, OnSendWhoLine(user, parms, u, wholine)); + FOREACH_MOD(OnSendWhoLine, (user, parms, u, wholine)); if (!wholine.empty()) whoresults.push_back(wholine); diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 116e43135..f75bd13fe 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -173,7 +173,7 @@ void CommandWhois::DoWhois(User* user, User* dest, unsigned long signon, unsigne } } - FOREACH_MOD(I_OnWhois,OnWhois(user,dest)); + FOREACH_MOD(OnWhois, (user,dest)); /* * We only send these if we've been provided them. That is, if hidewhois is turned off, and user is local, or |