summaryrefslogtreecommitdiff
path: root/src/modules/m_rmode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_rmode.cpp')
-rw-r--r--src/modules/m_rmode.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp
index 1bbbb37bf..6d17820a5 100644
--- a/src/modules/m_rmode.cpp
+++ b/src/modules/m_rmode.cpp
@@ -56,9 +56,8 @@ class CommandRMode : public Command
return CMD_FAILURE;
}
- unsigned int prefixrank;
- char prefixchar;
std::string pattern = parameters.size() > 2 ? parameters[2] : "*";
+ PrefixMode* pm;
ListModeBase* lm;
ListModeBase::ModeList* ml;
irc::modestacker modestack(false);
@@ -68,14 +67,14 @@ class CommandRMode : public Command
if (chan->IsModeSet(mh))
modestack.Push(modeletter);
}
- else if (((prefixrank = mh->GetPrefixRank()) && (prefixchar = mh->GetPrefix())))
+ else if ((pm = mh->IsPrefixMode()))
{
// As user prefix modes don't have a GetList() method, let's iterate through the channel's users.
for (UserMembIter it = chan->userlist.begin(); it != chan->userlist.end(); ++it)
{
if (!InspIRCd::Match(it->first->nick, pattern))
continue;
- if (((strchr(chan->GetAllPrefixChars(user), prefixchar)) != NULL) && !(it->first == user && prefixrank > VOICE_VALUE))
+ if (it->second->hasMode(modeletter) && !((it->first == user) && (pm->GetPrefixRank() > VOICE_VALUE)))
modestack.Push(modeletter, it->first->nick);
}
}