From 74ccc28da30896ee715504d53822f7b3ce6ec86f Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 14 Feb 2014 12:15:00 +0100 Subject: Move GetPrefixChar() from Channel to Membership --- src/commands/cmd_who.cpp | 2 +- src/commands/cmd_whois.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/commands') diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index d7084d53b..2be724e91 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -224,7 +224,7 @@ void CommandWho::SendWhoLine(User* user, const std::vector& parms, } if (memb) - wholine.append(memb->chan->GetPrefixChar(u)); + wholine.push_back(memb->GetPrefixChar()); wholine.append(" :0 " + u->fullname); diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 29322f802..61a4ad891 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -65,12 +65,16 @@ std::string CommandWhois::ChannelList(User* source, User* dest, bool spy) for (UCListIter i = dest->chans.begin(); i != dest->chans.end(); i++) { - Channel* c = (*i)->chan; + Membership* memb = *i; + Channel* c = memb->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 */ if (spy != (source == dest || !(c->IsModeSet(privatemode) || c->IsModeSet(secretmode)) || c->HasUser(source))) - list.append(c->GetPrefixChar(dest)).append(c->name).append(" "); + { + list.push_back(memb->GetPrefixChar()); + list.append(c->name).push_back(' '); + } } return list; -- cgit v1.2.3