diff options
-rw-r--r-- | src/cmd_notice.cpp | 26 | ||||
-rw-r--r-- | src/cmd_privmsg.cpp | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/cmd_notice.cpp b/src/cmd_notice.cpp index 7ce2d93c5..0a5aee051 100644 --- a/src/cmd_notice.cpp +++ b/src/cmd_notice.cpp @@ -38,19 +38,19 @@ CmdResult cmd_notice::Handle (const char** parameters, int pcnt, userrec *user) if ((parameters[0][0] == '$') && ((*user->oper) || (ServerInstance->ULine(user->server)))) { int MOD_RESULT = 0; - std::string temp = parameters[1]; - FOREACH_RESULT(I_OnUserPreNotice,OnUserPreNotice(user,(void*)parameters[0],TYPE_SERVER,temp,0,exempt_list)); - if (MOD_RESULT) - return CMD_FAILURE; - parameters[1] = (char*)temp.c_str(); - // notice to server mask - const char* servermask = parameters[0] + 1; - if (match(ServerInstance->Config->ServerName,servermask)) - { - user->SendAll("NOTICE", "%s", parameters[1]); - } - FOREACH_MOD(I_OnUserMessage,OnUserNotice(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,exempt_list)); - return CMD_SUCCESS; + std::string temp = parameters[1]; + FOREACH_RESULT(I_OnUserPreNotice,OnUserPreNotice(user,(void*)parameters[0],TYPE_SERVER,temp,0,exempt_list)); + if (MOD_RESULT) + return CMD_FAILURE; + parameters[1] = temp.c_str(); + // notice to server mask + const char* servermask = parameters[0] + 1; + if (match(ServerInstance->Config->ServerName,servermask)) + { + user->SendAll("NOTICE", "%s", parameters[1]); + } + FOREACH_MOD(I_OnUserMessage,OnUserNotice(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0,exempt_list)); + return CMD_SUCCESS; } char status = 0; if ((*parameters[0] == '@') || (*parameters[0] == '%') || (*parameters[0] == '+')) diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp index d83e71662..425465109 100644 --- a/src/cmd_privmsg.cpp +++ b/src/cmd_privmsg.cpp @@ -44,7 +44,7 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) FOREACH_RESULT(I_OnUserPreMessage,OnUserPreMessage(user,(void*)parameters[0],TYPE_SERVER,temp,0,except_list)); if (MOD_RESULT) return CMD_FAILURE; - parameters[1] = (char*)temp.c_str(); + parameters[1] = temp.c_str(); // notice to server mask const char* servermask = parameters[0] + 1; if (match(ServerInstance->Config->ServerName,servermask)) |