X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_user%2Fcmd_part.cpp;h=9400eed9347cdd0526f43350d0cda66fd79f2ea1;hb=8b0d03971797110112acadf683e08301b094ca92;hp=77aafd1b37380c803975d455e28cba15e1829653;hpb=0b63ccd0b5cb26883d6becb196fb98e4f95d0397;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_user/cmd_part.cpp b/src/coremods/core_user/cmd_part.cpp index 77aafd1b3..9400eed93 100644 --- a/src/coremods/core_user/cmd_part.cpp +++ b/src/coremods/core_user/cmd_part.cpp @@ -25,10 +25,10 @@ CommandPart::CommandPart(Module* parent) : Command(parent, "PART", 1, 2) { Penalty = 5; - syntax = "{,} []"; + syntax = "[,]+ [:]"; } -CmdResult CommandPart::Handle (const std::vector& parameters, User *user) +CmdResult CommandPart::Handle(User* user, const Params& parameters) { std::string reason; if (parameters.size() > 1) @@ -46,20 +46,20 @@ CmdResult CommandPart::Handle (const std::vector& parameters, User if (!c) { - user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str()); + user->WriteNumeric(Numerics::NoSuchChannel(parameters[0])); return CMD_FAILURE; } if (!c->PartUser(user, reason)) { - user->WriteNumeric(ERR_NOTONCHANNEL, "%s :You're not on that channel", c->name.c_str()); + user->WriteNumeric(ERR_NOTONCHANNEL, c->name, "You're not on that channel"); return CMD_FAILURE; } return CMD_SUCCESS; } -RouteDescriptor CommandPart::GetRouting(User* user, const std::vector& parameters) +RouteDescriptor CommandPart::GetRouting(User* user, const Params& parameters) { return (IS_LOCAL(user) ? ROUTE_LOCALONLY : ROUTE_BROADCAST); }