summaryrefslogtreecommitdiff
path: root/src/cmd_who.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_who.cpp')
-rw-r--r--src/cmd_who.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp
index 725d19bb7..112d2e030 100644
--- a/src/cmd_who.cpp
+++ b/src/cmd_who.cpp
@@ -23,15 +23,11 @@
/* get the last 'visible' chan of a user */
static char *getlastchanname(userrec *u)
{
- for (std::vector<ucrec*>::const_iterator v = u->chans.begin(); v != u->chans.end(); v++)
+ UCListIter i = u->chans.begin();
+ if (i != u->chans.end())
{
- ucrec* temp = (ucrec*)*v;
-
- if (temp->channel)
- {
- if (!temp->channel->IsModeSet('s'))
- return temp->channel->name;
- }
+ if (!i->first->IsModeSet('s'))
+ return i->first->name;
}
return "*";