X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_who.cpp;h=5a5c27dcfd87f15262eb8391bc8a92cf33739bb5;hb=ca0083cba90c8830f5018b73eb715665a8db9dd7;hp=c474abc3c8b2ea7c4662b3f24568181793553074;hpb=44f42a13de52c8025942ddab42f51feb36821782;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index c474abc3c..5a5c27dcf 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -138,7 +138,7 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) match = InspIRCd::Match(user->awaymsg, matchtext); else if (opt_time) { - long seconds = ServerInstance->Duration(matchtext); + long seconds = InspIRCd::Duration(matchtext); // Okay, so time matching, we want all users connected `seconds' ago if (user->age >= ServerInstance->Time() - seconds) @@ -197,11 +197,11 @@ void CommandWho::SendWhoLine(User* user, const std::vector& parms, wholine.append(ServerInstance->Config->HideWhoisServer); else wholine.append(u->server); - + wholine.append(" " + u->nick + " "); /* away? */ - if (IS_AWAY(u)) + if (u->IsAway()) { wholine.append("G"); } @@ -211,7 +211,7 @@ void CommandWho::SendWhoLine(User* user, const std::vector& parms, } /* oper? */ - if (IS_OPER(u)) + if (u->IsOper()) { wholine.push_back('*'); } @@ -251,7 +251,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * Channel *ch = NULL; std::vector whoresults; - std::string initial = "352 " + std::string(user->nick) + " "; + std::string initial = "352 " + user->nick + " "; char matchtext[MAXBUF]; bool usingwildcards = false; @@ -342,7 +342,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * if (user != i->first) { /* opers only, please */ - if (opt_viewopersonly && !IS_OPER(i->first)) + if (opt_viewopersonly && !i->first->IsOper()) continue; /* If we're not inside the channel, hide +i users */