]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands.cpp
Skip module tags which don't have a module specified.
[user/henk/code/inspircd.git] / src / commands.cpp
index 8343cfaacbbf8e85964c149ed384dd273900821b..f855c7b6c91d9afd234a8f4366b6ded8f72711da 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2018, 2020 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2009 Robin Burchell <robin+git@viroteck.net>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
@@ -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)