]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands.cpp
Add the Numerics::CannotSendTo class and switch stuff to use it.
[user/henk/code/inspircd.git] / src / commands.cpp
index 8343cfaacbbf8e85964c149ed384dd273900821b..d1746bc5f0f66d962b3315e4a9c63d5dfa9a74e4 100644 (file)
@@ -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)