From 932e8d13f81c7c94a89dc3702f6d45bc185f5dcf Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 24 Jan 2014 12:58:01 +0100 Subject: Convert UserChanList to an intrusively linked list --- src/commands/cmd_who.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/commands/cmd_who.cpp') diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index a059a3f9c..37a04af83 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -45,10 +45,9 @@ class CommandWho : public Command Channel* get_first_visible_channel(User *u) { - UCListIter i = u->chans.begin(); - while (i != u->chans.end()) + for (UCListIter i = u->chans.begin(); i != u->chans.end(); ++i) { - Channel* c = *i++; + Channel* c = (*i)->chan; if (!c->IsModeSet(secretmode)) return c; } -- cgit v1.2.3