diff options
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 9973df411..7aeaae1dc 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -291,8 +291,8 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool ModeHandler* neededmh = NULL; for(char c='A'; c <= 'z'; c++) { - ModeHandler *privmh = FindMode(modechar, type); - if (privmh->GetPrefixRank() >= neededrank) + ModeHandler *privmh = FindMode(c, MODETYPE_CHANNEL); + if (privmh && privmh->GetPrefixRank() >= neededrank) { // this mode is sufficient to allow this action if (!neededmh || privmh->GetPrefixRank() < neededmh->GetPrefixRank()) |