]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_userhost.cpp
cmd_lusers Convert to a module
[user/henk/code/inspircd.git] / src / commands / cmd_userhost.cpp
index 726c063b334f80d2f38d6ef10ac427090ab11968..399de0b1a21d8dff83fbd73e4078d4bcde8045ba 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
@@ -42,7 +44,7 @@ class CommandUserhost : public Command
 
 CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, User *user)
 {
-       std::string retbuf = std::string("302 ") + user->nick + " :";
+       std::string retbuf = "302 " + user->nick + " :";
 
        for (unsigned int i = 0; i < parameters.size(); i++)
        {
@@ -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 += "-";