diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-10 20:54:03 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-10 20:54:03 +0000 |
commit | 87ad22b6067534329f76acc45fdad8e09688db65 (patch) | |
tree | 536e82bea9362c268c50d8dd1a7b3e80473fa0a3 /src/modules | |
parent | b790dee4873df308247655bb8ca88be9c483b536 (diff) |
Better error messages for m_autoop
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12423 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_autoop.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 5dc54fba6..b96495bf7 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -36,8 +36,12 @@ class AutoOpList : public ListModeBase { pos--; ModeHandler* mh = ServerInstance->Modes->FindMode(parameter[pos], MODETYPE_CHANNEL); - if (adding && !mh) + if (adding && (!mh || !mh->GetPrefixRank())) + { + source->WriteNumeric(415, "%s %c :Cannot find prefix mode '%c' for autoop", + source->nick.c_str(), parameter[pos], parameter[pos]); return MOD_RES_DENY; + } else if (!mh) continue; @@ -45,7 +49,11 @@ class AutoOpList : public ListModeBase if (mh->AccessCheck(source, channel, dummy, true) == MOD_RES_DENY) return MOD_RES_DENY; if (mh->GetLevelRequired() > mylevel) + { + source->WriteNumeric(482, "%s %s :You must be able to set mode '%c' to include it in an autoop", + source->nick.c_str(), channel->name.c_str(), parameter[pos]); return MOD_RES_DENY; + } } return MOD_RES_PASSTHRU; } |