]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_userhost.cpp
Reduce std::string::substr() usage
[user/henk/code/inspircd.git] / src / coremods / core_userhost.cpp
index 9d4c9e8f71b256bcd36faeecd9a6fbcaad4c0ea4..a6782419496a0710f13bc8480a4248d7e07c87d7 100644 (file)
@@ -28,7 +28,7 @@ class CommandUserhost : public Command
        /** Constructor for userhost.
         */
        CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) {
-               syntax = "<nick> {<nick>}";
+               syntax = "<nick> [<nick> ...]";
        }
        /** Handle command.
         * @param parameters The parameters to the command
@@ -59,7 +59,7 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
                        retbuf += (u->IsAway() ? '-' : '+');
                        retbuf += u->ident;
                        retbuf += '@';
-                       retbuf += (has_privs ? u->host : u->dhost);
+                       retbuf += (((u == user) || (has_privs)) ? u->host : u->dhost);
                        retbuf += ' ';
                }
        }