X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_user%2Fcmd_part.cpp;h=e7164d35f5abf4ef567d6bb9b76fdd6c5894c651;hb=HEAD;hp=4da2787d902b13f4d958e1d65ab0d1c8d86bdd2e;hpb=c6a508a3da977041909f18f77d6e8fea942512cf;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 4da2787d9..e7164d35f 100644 --- a/src/coremods/core_user/cmd_part.cpp +++ b/src/coremods/core_user/cmd_part.cpp @@ -1,8 +1,15 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2018 Sadie Powell + * Copyright (C) 2017 B00mX0r + * Copyright (C) 2012-2016 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2009 Daniel De Graaf * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -25,10 +32,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,7 +53,7 @@ CmdResult CommandPart::Handle (const std::vector& parameters, User if (!c) { - user->WriteNumeric(Numerics::NoSuchNick(parameters[0])); + user->WriteNumeric(Numerics::NoSuchChannel(parameters[0])); return CMD_FAILURE; } @@ -59,7 +66,7 @@ CmdResult CommandPart::Handle (const std::vector& parameters, User 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); }