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))
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;
}
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
*/
}
if (memb)
- wholine.push_back(memb->GetPrefixChar());
+ {
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ wholine.push_back(prefix);
+ }
wholine.append(" :0 " + u->fullname);
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)
{
if (!user->SharesChannelWith(oper))
{
- if (usingwildcards && (!oper->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex")))
+ if (usingwildcards && (oper->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex")))
continue;
}