diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/coremods/core_userhost.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/coremods/core_userhost.cpp b/src/coremods/core_userhost.cpp index 541402c10..8fa897641 100644 --- a/src/coremods/core_userhost.cpp +++ b/src/coremods/core_userhost.cpp @@ -40,6 +40,8 @@ class CommandUserhost : public Command CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, User *user) { + const bool has_privs = user->HasPrivPermission("users/auspex"); + std::string retbuf = "302 " + user->nick + " :"; for (unsigned int i = 0; i < parameters.size(); i++) @@ -62,15 +64,7 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U retbuf = retbuf + u->ident + "@"; - if (user->HasPrivPermission("users/auspex")) - { - retbuf = retbuf + u->host; - } - else - { - retbuf = retbuf + u->dhost; - } - + retbuf += (has_privs ? u->host : u->dhost); retbuf = retbuf + " "; } } |