X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_notice.cpp;h=ee9868fb3f9a13b2ad21d3da60a93727ba8f3afb;hb=3f971b447fae258a92f2cc6645497cce93f1c04e;hp=5822551dae4072f588a60fc7e5e7d445395dccdd;hpb=dd36852a52e8541306b76c5b88bce8ab9b36654c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index 5822551da..ee9868fb3 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -68,12 +68,12 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * { if ((chan->IsModeSet('n')) && (!chan->HasUser(user))) { - user->WriteServ("404 %s %s :Cannot send to channel (no external messages)", user->nick, chan->name); + user->WriteNumeric(404, "%s %s :Cannot send to channel (no external messages)", user->nick, chan->name); return CMD_FAILURE; } if ((chan->IsModeSet('m')) && (chan->GetStatus(user) < STATUS_VOICE)) { - user->WriteServ("404 %s %s :Cannot send to channel (+m)", user->nick, chan->name); + user->WriteNumeric(404, "%s %s :Cannot send to channel (+m)", user->nick, chan->name); return CMD_FAILURE; } } @@ -88,7 +88,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * if (temp.empty()) { - user->WriteServ("412 %s :No text to send", user->nick); + user->WriteNumeric(412, "%s :No text to send", user->nick); return CMD_FAILURE; } @@ -115,7 +115,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * else { /* no such nick/channel */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, target); + user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, target); return CMD_FAILURE; } return CMD_SUCCESS; @@ -135,7 +135,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * if (dest && strcasecmp(dest->server, targetserver + 1)) { /* Incorrect server for user */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]); + user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0]); return CMD_FAILURE; } } @@ -149,7 +149,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * { if (!*parameters[1]) { - user->WriteServ("412 %s :No text to send", user->nick); + user->WriteNumeric(412, "%s :No text to send", user->nick); return CMD_FAILURE; } @@ -174,7 +174,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User * else { /* no such nick/channel */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]); + user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0]); return CMD_FAILURE; }