X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_user%2Fcmd_mode.cpp;h=b1790bb89eb77d133b5cce795bf1c233fbcdfa5d;hb=292c2b90c8a9c7a05f34bdb6900e160f992e4f69;hp=a62bf51ca47f7647583a3857f169494e0032c01a;hpb=6352a6f9c9685c32ec17a7d6f9f89df0e3ec3054;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_user/cmd_mode.cpp b/src/coremods/core_user/cmd_mode.cpp index a62bf51ca..b1790bb89 100644 --- a/src/coremods/core_user/cmd_mode.cpp +++ b/src/coremods/core_user/cmd_mode.cpp @@ -45,7 +45,7 @@ CmdResult CommandMode::Handle(const std::vector& parameters, User* if ((!targetchannel) && (!targetuser)) { - user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", target.c_str()); + user->WriteNumeric(Numerics::NoSuchNick(target)); return CMD_FAILURE; } if (parameters.size() == 1) @@ -70,7 +70,7 @@ CmdResult CommandMode::Handle(const std::vector& parameters, User* if ((targetuser) && (user != targetuser)) { // Local users may only change the modes of other users if a module explicitly allows it - user->WriteNumeric(ERR_USERSDONTMATCH, ":Can't change mode for other users"); + user->WriteNumeric(ERR_USERSDONTMATCH, "Can't change mode for other users"); return CMD_FAILURE; } @@ -135,8 +135,8 @@ void CommandMode::DisplayCurrentModes(User* user, User* targetuser, Channel* tar if (targetchannel) { // Display channel's current mode string - user->WriteNumeric(RPL_CHANNELMODEIS, "%s +%s", targetchannel->name.c_str(), targetchannel->ChanModes(targetchannel->HasUser(user))); - user->WriteNumeric(RPL_CHANNELCREATED, "%s %lu", targetchannel->name.c_str(), (unsigned long)targetchannel->age); + user->WriteNumeric(RPL_CHANNELMODEIS, targetchannel->name, (std::string("+") + targetchannel->ChanModes(targetchannel->HasUser(user)))); + user->WriteNumeric(RPL_CHANNELCREATED, targetchannel->name, (unsigned long)targetchannel->age); } else { @@ -157,7 +157,7 @@ void CommandMode::DisplayCurrentModes(User* user, User* targetuser, Channel* tar } else { - user->WriteNumeric(ERR_USERSDONTMATCH, ":Can't view modes for other users"); + user->WriteNumeric(ERR_USERSDONTMATCH, "Can't view modes for other users"); } } }