summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-05 16:39:08 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-05 16:39:08 +0000
commita85a9b8c115762ce691e9cfb3c1175725a920c87 (patch)
tree051acad5cdfd94ff81fa98aec999c163fd9ee5b5
parentd21682a3a012e00e2e9b97bed63ca0683f3ddd95 (diff)
Fix a cosmetic issue: 'oper type does not have access'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9359 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 6805c348c..342345869 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -579,12 +579,23 @@ void ModeParser::Process(const char* const* parameters, int pcnt, User *user, bo
*/
if ((IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!user->HasModePermission(modehandlers[handler_id]->GetModeChar(), type)))
{
- user->WriteNumeric(481, "%s :Permission Denied - Oper type %s does not have access to %sset %s mode %c",
- user->nick,
- user->oper,
- adding ? "" : "un",
- type == MODETYPE_CHANNEL ? "channel" : "user",
- modehandlers[handler_id]->GetModeChar());
+ if (IS_OPER(user))
+ {
+ user->WriteNumeric(481, "%s :Permission Denied - Oper type %s does not have access to %sset %s mode %c",
+ user->nick,
+ user->oper,
+ adding ? "" : "un",
+ type == MODETYPE_CHANNEL ? "channel" : "user",
+ modehandlers[handler_id]->GetModeChar());
+ }
+ else
+ {
+ user->WriteNumeric(481, "%s :Permission Denied - Only operators may %sset %s mode %c",
+ user->nick,
+ adding ? "" : "un",
+ type == MODETYPE_CHANNEL ? "channel" : "user",
+ modehandlers[handler_id]->GetModeChar());
+ }
continue;
}