]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_userhost.cpp
Reduce User* -> Membership* lookups on part and kick
[user/henk/code/inspircd.git] / src / commands / cmd_userhost.cpp
index af7d3ceca65ba34903dc6aef65a5ee98a7cc07a2..933cbca041e05514cc8294d10835162889409e64 100644 (file)
@@ -44,7 +44,7 @@ class CommandUserhost : public Command
 
 CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, User *user)
 {
-       std::string retbuf = std::string("302 ") + user->nick + " :";
+       std::string retbuf = "302 " + user->nick + " :";
 
        for (unsigned int i = 0; i < parameters.size(); i++)
        {
@@ -54,12 +54,12 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
                {
                        retbuf = retbuf + u->nick;
 
-                       if (IS_OPER(u))
+                       if (u->IsOper())
                                retbuf = retbuf + "*";
 
                        retbuf = retbuf + "=";
 
-                       if (IS_AWAY(u))
+                       if (u->IsAway())
                                retbuf += "-";
                        else
                                retbuf += "+";