X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_userhost.cpp;h=a6782419496a0710f13bc8480a4248d7e07c87d7;hb=47dda4f61512f6047f2b1dcccd1943aab74726e3;hp=8fa897641f69f36b70a977203f11d68c02aab795;hpb=abc36583542c458a60a63c315791964bb6380879;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_userhost.cpp b/src/coremods/core_userhost.cpp index 8fa897641..a67824194 100644 --- a/src/coremods/core_userhost.cpp +++ b/src/coremods/core_userhost.cpp @@ -28,7 +28,7 @@ class CommandUserhost : public Command /** Constructor for userhost. */ CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) { - syntax = " {}"; + syntax = " [ ...]"; } /** Handle command. * @param parameters The parameters to the command @@ -50,22 +50,17 @@ CmdResult CommandUserhost::Handle (const std::vector& parameters, U if ((u) && (u->registered == REG_ALL)) { - retbuf = retbuf + u->nick; + retbuf += u->nick; if (u->IsOper()) - retbuf = retbuf + "*"; + retbuf += '*'; - retbuf = retbuf + "="; - - if (u->IsAway()) - retbuf += "-"; - else - retbuf += "+"; - - retbuf = retbuf + u->ident + "@"; - - retbuf += (has_privs ? u->host : u->dhost); - retbuf = retbuf + " "; + retbuf += '='; + retbuf += (u->IsAway() ? '-' : '+'); + retbuf += u->ident; + retbuf += '@'; + retbuf += (((u == user) || (has_privs)) ? u->host : u->dhost); + retbuf += ' '; } }