diff options
Diffstat (limited to 'src/cmd_privmsg.cpp')
-rw-r--r-- | src/cmd_privmsg.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp index 30d766e82..1218eca39 100644 --- a/src/cmd_privmsg.cpp +++ b/src/cmd_privmsg.cpp @@ -45,12 +45,19 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) if ((parameters[0][0] == '$') && ((*user->oper) || (is_uline(user->server)))) { + int MOD_RESULT = 0; + std::string temp = parameters[1]; + FOREACH_RESULT(I_OnUserPreMessage,OnUserPreMessage(user,(void*)parameters[0],TYPE_SERVER,temp,0)); + if (MOD_RESULT) + return; + parameters[1] = (char*)temp.c_str(); // notice to server mask const char* servermask = parameters[0] + 1; if (match(Config->ServerName,servermask)) { ServerPrivmsgAll("%s",parameters[1]); } + FOREACH_MOD(I_OnUserMessage,OnUserMessage(user,(void*)parameters[0],TYPE_SERVER,parameters[1],0)); return; } char status = 0; |