From ace3d85982f99ab04318ce705fd29fec5ffd7320 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:31:03 +0000 Subject: Remove double prefix conversion from Channel::RawWriteAllExcept git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11698 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/channels.cpp b/src/channels.cpp index 0a4ef993d..2a0079bc1 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -691,12 +691,19 @@ void Channel::WriteAllExcept(User* user, bool serversource, char status, CUList void Channel::RawWriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const std::string &out) { + char statmode = 0; + if (status) + { + ModeHandler* mh = ServerInstance->Modes->FindPrefix(status); + if (mh) + statmode = mh->GetModeChar(); + } for (UserMembIter i = userlist.begin(); i != userlist.end(); i++) { if ((IS_LOCAL(i->first)) && (except_list.find(i->first) == except_list.end())) { /* User doesnt have the status we're after */ - if (status && !strchr(this->GetAllPrefixChars(i->first), status)) + if (statmode && !i->second->hasMode(statmode)) continue; i->first->Write(out); -- cgit v1.2.3