diff options
| author | 2006-07-08 15:14:11 +0000 | |
|---|---|---|
| committer | 2006-07-08 15:14:11 +0000 | |
| commit | d2cc26fb379dca9c74c6068bc33aaaae6beece6e (patch) | |
| tree | a2f9f1520fa49d4261edda2ee4193f92cbb349ec /src/mode.cpp | |
| parent | Integrate +o into handlers (diff) | |
Put back security checks so non-ops cant set modes again :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4167 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index ac65ee47b..247ef2edd 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -348,6 +348,20 @@ void ModeParser::Process(char **parameters, int pcnt, userrec *user, bool server log(DEBUG,"Target type is CHANNEL"); type = MODETYPE_CHANNEL; mask = MASK_CHANNEL; + + /* Extra security checks on channel modes + * (e.g. are they a (half)op? + */ + + if (((!is_uline(user->server)) && (!servermode)) || (cstatus(user, targetchannel) < STATUS_HOP)) + { + /* Not enough permission: + * NOT a uline and NOT a servermode, + * OR, NOT halfop or above. + */ + WriteServ(user->fd,"482 %s %s :You're not a channel (half)operator",user->nick, targetchannel->name); + return; + } } else if (targetuser) { |
