summaryrefslogtreecommitdiff
path: root/src/commands/cmd_who.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_who.cpp')
-rw-r--r--src/commands/cmd_who.cpp5
1 files changed, 2 insertions, 3 deletions
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;
}