From 7a43a5d87593a1f8ea06a5f32865e73b88c7afea Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 22 Jun 2014 13:27:28 +0200 Subject: core_userhost Append data to the output in a saner way --- src/coremods/core_userhost.cpp | 19 +++++++------------ 1 file 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& 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 += ' '; } } -- cgit v1.2.3