Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@attilamolnar attilamolnar authored
Showing with 9 additions and 9 deletions.
  1. +3 −1 src/commands/cmd_ison.cpp
  2. +6 −8 src/commands/cmd_userhost.cpp
View
4 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> {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
View
14 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 = "<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 += "-";
Please sign in to comment.
Something went wrong with that request. Please try again.