summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-22 13:27:28 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-22 13:27:28 +0200
commit7a43a5d87593a1f8ea06a5f32865e73b88c7afea (patch)
tree667f5883a0e348469eb366c5acc13b37c2d0bbb1 /src
parentabc36583542c458a60a63c315791964bb6380879 (diff)
core_userhost Append data to the output in a saner way
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_userhost.cpp19
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 += ' ';
}
}