X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands.cpp;h=f855c7b6c91d9afd234a8f4366b6ded8f72711da;hb=b618b194f3166a55ca7e7889c7346b65c174d397;hp=8343cfaacbbf8e85964c149ed384dd273900821b;hpb=8d1255a82c1bdb53928a007be113caff15683d53;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands.cpp b/src/commands.cpp index 8343cfaac..f855c7b6c 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018 Sadie Powell + * Copyright (C) 2018, 2020 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2009 Robin Burchell * Copyright (C) 2009 Daniel De Graaf @@ -66,6 +66,17 @@ void Command::RegisterService() throw ModuleException("Command already exists: " + name); } +void Command::TellNotEnoughParameters(LocalUser* user, const Params& parameters) +{ + user->WriteNumeric(ERR_NEEDMOREPARAMS, name, "Not enough parameters."); + if (ServerInstance->Config->SyntaxHints && user->registered == REG_ALL && syntax.length()) + user->WriteNumeric(RPL_SYNTAX, name, syntax); +} + +void Command::TellNotRegistered(LocalUser* user, const Params& parameters) +{ + user->WriteNumeric(ERR_NOTREGISTERED, name, "You have not registered."); +} SplitCommand::SplitCommand(Module* me, const std::string& cmd, unsigned int minpara, unsigned int maxpara) : Command(me, cmd, minpara, maxpara)