]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
core_userhost Append data to the output in a saner way
authorAttila Molnar <attilamolnar@hush.com>
Sun, 22 Jun 2014 11:27:28 +0000 (13:27 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 22 Jun 2014 11:27:28 +0000 (13:27 +0200)
src/coremods/core_userhost.cpp

index 8fa897641f69f36b70a977203f11d68c02aab795..9d4c9e8f71b256bcd36faeecd9a6fbcaad4c0ea4 100644 (file)
@@ -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 += ' ';
                }
        }