diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-22 13:27:28 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-22 13:27:28 +0200 |
commit | 7a43a5d87593a1f8ea06a5f32865e73b88c7afea (patch) | |
tree | 667f5883a0e348469eb366c5acc13b37c2d0bbb1 | |
parent | abc36583542c458a60a63c315791964bb6380879 (diff) |
core_userhost Append data to the output in a saner way
-rw-r--r-- | src/coremods/core_userhost.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/coremods/core_userhost.cpp b/src/coremods/core_userhost.cpp index 8fa897641..9d4c9e8f7 100644 --- a/src/coremods/core_userhost.cpp +++ b/src/coremods/core_userhost.cpp @@ -50,22 +50,17 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U if ((u) && (u->registered == REG_ALL)) { - retbuf = retbuf + u->nick; + retbuf += u->nick; if (u->IsOper()) - retbuf = retbuf + "*"; - - retbuf = retbuf + "="; - - if (u->IsAway()) - retbuf += "-"; - else - retbuf += "+"; - - retbuf = retbuf + u->ident + "@"; + retbuf += '*'; + retbuf += '='; + retbuf += (u->IsAway() ? '-' : '+'); + retbuf += u->ident; + retbuf += '@'; retbuf += (has_privs ? u->host : u->dhost); - retbuf = retbuf + " "; + retbuf += ' '; } } |