diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-03 21:42:47 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-03 21:42:47 +0000 |
commit | 9f050cf19594ce424ec50c8469d49157a6f2fe75 (patch) | |
tree | 106eeb45b39a9da4b2b3efb94e1cdc9ec5489ab7 /src/mode.cpp | |
parent | 6f914e2dd80375fa9809619c21a09705e4d24129 (diff) |
Fix mode required error message
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12364 e03df62e-2008-0410-955e-edbf42e46eb7
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()) |