diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-24 12:58:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-24 12:58:01 +0100 |
commit | 932e8d13f81c7c94a89dc3702f6d45bc185f5dcf (patch) | |
tree | cb50264af2ff50ccf8070ce9123ee350d95ff7f8 /src/commands | |
parent | 9a962e1c512ffc00bcfce105e9dbdabd9abcdd86 (diff) |
Convert UserChanList to an intrusively linked list
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_who.cpp | 5 | ||||
-rw-r--r-- | src/commands/cmd_whois.cpp | 2 |
2 files changed, 3 insertions, 4 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; } diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index e8a751fa0..29322f802 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -65,7 +65,7 @@ std::string CommandWhois::ChannelList(User* source, User* dest, bool spy) for (UCListIter i = dest->chans.begin(); i != dest->chans.end(); i++) { - Channel* c = *i; + Channel* c = (*i)->chan; /* If the target is the sender, neither +p nor +s is set, or * the channel contains the user, it is not a spy channel */ |