diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-13 20:53:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-13 20:53:28 +0000 |
commit | 66d3e076e18f6b3d747d633bfd1f5527665a1a33 (patch) | |
tree | c0c4b2f8b6eb4d572425554e8ba508f49e853c1c | |
parent | 4620e01f3612504488032f0d154336fad7d7a95f (diff) |
Only restrict set with <class:usermodes/chanmodes>, not unset
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9494 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/mode.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 342345869..e562a8551 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -577,22 +577,20 @@ void ModeParser::Process(const char* const* parameters, int pcnt, User *user, bo /* It's an oper only mode, check if theyre an oper. If they arent, * eat any parameter that came with the mode, and continue to next */ - if ((IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!user->HasModePermission(modehandlers[handler_id]->GetModeChar(), type))) + if (adding && (IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!user->HasModePermission(modehandlers[handler_id]->GetModeChar(), type))) { if (IS_OPER(user)) { - user->WriteNumeric(481, "%s :Permission Denied - Oper type %s does not have access to %sset %s mode %c", + user->WriteNumeric(481, "%s :Permission Denied - Oper type %s does not have access to set %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->WriteNumeric(481, "%s :Permission Denied - Only operators may set %s mode %c", user->nick, - adding ? "" : "un", type == MODETYPE_CHANNEL ? "channel" : "user", modehandlers[handler_id]->GetModeChar()); } |