Skip to content
This repository
Browse code

Merge pull request #223 from Shawn-Smith/insp20+needmoreparams

[2.0] Fix to show ERR_NEEDMOREPARAMS for USERHOST and ISON
  • Loading branch information...
commit 557269cdcafef119ea031d7af91d1ac0c25eebd4 2 parents 85b9374 + b450b1a
Attila Molnar authored July 06, 2012
4  src/commands/cmd_ison.cpp
@@ -30,7 +30,9 @@ class CommandIson : public Command
30 30
  public:
31 31
 	/** Constructor for ison.
32 32
 	 */
33  
-	CommandIson ( Module* parent) : Command(parent,"ISON",0,0) { syntax = "<nick> {nick}"; }
  33
+	CommandIson ( Module* parent) : Command(parent,"ISON", 1) {
  34
+		syntax = "<nick> {nick}";
  35
+	}
34 36
 	/** Handle command.
35 37
 	 * @param parameters The parameters to the comamnd
36 38
 	 * @param pcnt The number of parameters passed to teh command
14  src/commands/cmd_userhost.cpp
@@ -30,7 +30,9 @@ class CommandUserhost : public Command
30 30
  public:
31 31
 	/** Constructor for userhost.
32 32
 	 */
33  
-	CommandUserhost ( Module* parent) : Command(parent,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
  33
+	CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) {
  34
+		syntax = "<nick> {<nick>}";
  35
+	}
34 36
 	/** Handle command.
35 37
 	 * @param parameters The parameters to the comamnd
36 38
 	 * @param pcnt The number of parameters passed to teh command
@@ -53,13 +55,9 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
53 55
 			retbuf = retbuf + u->nick;
54 56
 
55 57
 			if (IS_OPER(u))
56  
-			{
57  
-				retbuf = retbuf + "*=";
58  
-			}
59  
-			else
60  
-			{
61  
-				retbuf = retbuf + "=";
62  
-			}
  58
+				retbuf = retbuf + "*";
  59
+
  60
+			retbuf = retbuf + "=";
63 61
 
64 62
 			if (IS_AWAY(u))
65 63
 				retbuf += "-";

0 notes on commit 557269c

Please sign in to comment.
Something went wrong with that request. Please try again.