X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_who.cpp;h=8b9258d71d374160f2bbb8a3e792a93697436ad6;hb=90ab8cf4258a25e8403465ed86296fc74405620d;hp=2c120e5627551842f1decce0f72a03e8e9553f64;hpb=02e935ec7502b70fe85c9676bf8ddf0c15d9337e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index 2c120e562..8b9258d71 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -42,7 +42,7 @@ class CommandWho : public Command Membership* get_first_visible_channel(User* u) { - for (UCListIter i = u->chans.begin(); i != u->chans.end(); ++i) + for (User::ChanList::iterator i = u->chans.begin(); i != u->chans.end(); ++i) { Membership* memb = *i; if (!memb->chan->IsModeSet(secretmode)) @@ -144,7 +144,7 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) long seconds = InspIRCd::Duration(matchtext); // Okay, so time matching, we want all users connected `seconds' ago - if (user->age >= ServerInstance->Time() - seconds) + if (user->signon >= ServerInstance->Time() - seconds) match = true; } @@ -171,9 +171,6 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) bool CommandWho::CanView(Channel* chan, User* user) { - if (!user || !chan) - return false; - /* Bug #383 - moved higher up the list, because if we are in the channel * we can see all its users */ @@ -325,9 +322,8 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * bool inside = ch->HasUser(user); /* who on a channel. */ - const UserMembList *cu = ch->GetUsers(); - - for (UserMembCIter i = cu->begin(); i != cu->end(); i++) + const Channel::MemberMap& cu = ch->GetUsers(); + for (Channel::MemberMap::const_iterator i = cu.begin(); i != cu.end(); ++i) { /* None of this applies if we WHO ourselves */ if (user != i->first) @@ -360,7 +356,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * { if (!user->SharesChannelWith(oper)) { - if (usingwildcards && (!oper->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex"))) + if (usingwildcards && (oper->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex"))) continue; }