From 35de5a9acb6855f8d19a2f652b99f7d52d185078 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 18 Mar 2007 21:45:30 +0000 Subject: Remove two pointless casts, and remove some space indenting (how does this keep sneaking back) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6692 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_notice.cpp | 26 +++++++++++++------------- 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)) -- cgit v1.2.3