X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_privmsg.cpp;h=f3295df07e88f30d55a4d252bce3d8fb0d668b26;hb=bfdf503e5204ba17479084e688a3605dbc9007a2;hp=71e121a522bd6f2164b484934e3a131818096b4d;hpb=11554b8626d8b421cc9cf2c6f6cc3fe2467e0441;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp index 71e121a52..f3295df07 100644 --- a/src/cmd_privmsg.cpp +++ b/src/cmd_privmsg.cpp @@ -27,7 +27,6 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) { userrec *dest; chanrec *chan; - CUList except_list; user->idle_lastmsg = ServerInstance->Time(); @@ -88,9 +87,10 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) } parameters[1] = temp.c_str(); + /* Check again, a module may have zapped the input string */ if (temp.empty()) { - user->WriteServ("412 %s No text to send", user->nick); + user->WriteServ("412 %s :No text to send", user->nick); return CMD_FAILURE; } @@ -124,6 +124,12 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) dest = ServerInstance->FindNick(parameters[0]); if (dest) { + if (!*parameters[1]) + { + user->WriteServ("412 %s :No text to send", user->nick); + return CMD_FAILURE; + } + if (IS_AWAY(dest)) { /* auto respond with aweh msg */