From 1b823b21c71a9047a9bbb5fa931085bb4929f26a Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 6 Nov 2009 20:47:20 +0000 Subject: Send %#chan messages to all members ranked at least halfop, not just those that have halfop git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12046 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/channels.cpp b/src/channels.cpp index 500791ea3..3f0fc4a36 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -646,19 +646,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; + unsigned int minrank = 0; if (status) { ModeHandler* mh = ServerInstance->Modes->FindPrefix(status); if (mh) - statmode = mh->GetModeChar(); + minrank = mh->GetPrefixRank(); } for (UserMembIter i = userlist.begin(); i != userlist.end(); i++) { - if ((IS_LOCAL(i->first)) && (except_list.find(i->first) == except_list.end())) + if (IS_LOCAL(i->first) && (except_list.find(i->first) == except_list.end())) { - /* User doesnt have the status we're after */ - if (statmode && !i->second->hasMode(statmode)) + /* User doesn't have the status we're after */ + if (minrank && i->second->getRank() < minrank) continue; i->first->Write(out); -- cgit v1.2.3