From 9f050cf19594ce424ec50c8469d49157a6f2fe75 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 3 Feb 2010 21:42:47 +0000 Subject: Fix mode required error message git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12364 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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()) -- cgit v1.2.3