diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:03 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:03 +0000 |
commit | ace3d85982f99ab04318ce705fd29fec5ffd7320 (patch) | |
tree | 9f6fee419ab1195b64470a6304277a3ec02c256d /src | |
parent | 91df762e93212958db487d8517addba1a63a4ddd (diff) |
Remove double prefix conversion from Channel::RawWriteAllExcept
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11698 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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); |