From: Shawn Smith Date: Sat, 23 Jun 2012 00:43:49 +0000 (-0400) Subject: Fix to show ERR_NEEDMOREPARAMS for cmd_userhost and cmd_ison X-Git-Tag: v2.0.23~650^2 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=inline;h=b450b1a34ecf5ab0c7f1236dc86ce347e7cfa039;hp=85b9374a7a866e659d8289556a3d7c1c93f9dc9e;p=user%2Fhenk%2Fcode%2Finspircd.git Fix to show ERR_NEEDMOREPARAMS for cmd_userhost and cmd_ison --- diff --git a/src/commands/cmd_ison.cpp b/src/commands/cmd_ison.cpp index 784328eb5..1a50239ee 100644 --- a/src/commands/cmd_ison.cpp +++ b/src/commands/cmd_ison.cpp @@ -30,7 +30,9 @@ class CommandIson : public Command public: /** Constructor for ison. */ - CommandIson ( Module* parent) : Command(parent,"ISON",0,0) { syntax = " {nick}"; } + CommandIson ( Module* parent) : Command(parent,"ISON", 1) { + syntax = " {nick}"; + } /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command diff --git a/src/commands/cmd_userhost.cpp b/src/commands/cmd_userhost.cpp index 726c063b3..af7d3ceca 100644 --- a/src/commands/cmd_userhost.cpp +++ b/src/commands/cmd_userhost.cpp @@ -30,7 +30,9 @@ class CommandUserhost : public Command public: /** Constructor for userhost. */ - CommandUserhost ( Module* parent) : Command(parent,"USERHOST",0,1) { syntax = "{,}"; } + CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) { + syntax = " {}"; + } /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command @@ -53,13 +55,9 @@ CmdResult CommandUserhost::Handle (const std::vector& parameters, U retbuf = retbuf + u->nick; if (IS_OPER(u)) - { - retbuf = retbuf + "*="; - } - else - { - retbuf = retbuf + "="; - } + retbuf = retbuf + "*"; + + retbuf = retbuf + "="; if (IS_AWAY(u)) retbuf += "-";