]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix to show ERR_NEEDMOREPARAMS for cmd_userhost and cmd_ison
authorShawn Smith <ShawnSmith0828@gmail.com>
Sat, 23 Jun 2012 00:43:49 +0000 (20:43 -0400)
committerShawn Smith <ShawnSmith0828@gmail.com>
Fri, 6 Jul 2012 19:28:19 +0000 (15:28 -0400)
src/commands/cmd_ison.cpp
src/commands/cmd_userhost.cpp

index 784328eb59d5b8d7ebd7ad1fd359d00a8e100512..1a50239eeb2ff98d2536a57ef27f1feea0abc607 100644 (file)
@@ -30,7 +30,9 @@ class CommandIson : public Command
  public:
        /** Constructor for ison.
         */
-       CommandIson ( Module* parent) : Command(parent,"ISON",0,0) { syntax = "<nick> {nick}"; }
+       CommandIson ( Module* parent) : Command(parent,"ISON", 1) {
+               syntax = "<nick> {nick}";
+       }
        /** Handle command.
         * @param parameters The parameters to the comamnd
         * @param pcnt The number of parameters passed to teh command
index 726c063b334f80d2f38d6ef10ac427090ab11968..af7d3ceca65ba34903dc6aef65a5ee98a7cc07a2 100644 (file)
@@ -30,7 +30,9 @@ class CommandUserhost : public Command
  public:
        /** Constructor for userhost.
         */
-       CommandUserhost ( Module* parent) : Command(parent,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
+       CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) {
+               syntax = "<nick> {<nick>}";
+       }
        /** 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<std::string>& parameters, U
                        retbuf = retbuf + u->nick;
 
                        if (IS_OPER(u))
-                       {
-                               retbuf = retbuf + "*=";
-                       }
-                       else
-                       {
-                               retbuf = retbuf + "=";
-                       }
+                               retbuf = retbuf + "*";
+
+                       retbuf = retbuf + "=";
 
                        if (IS_AWAY(u))
                                retbuf += "-";