diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-18 21:45:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-18 21:45:30 +0000 |
commit | 35de5a9acb6855f8d19a2f652b99f7d52d185078 (patch) | |
tree | 924f383196372d4d06e6abb579204ff1f5d5fad1 | |
parent | 54b0eba65d820cde339efc63c56f6601ae4bb7f7 (diff) |
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
-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)) |