Tweak previous commit to avoid problems with OMODE.
Do not allow a user to op themselves if they are already opped, as "already opped" could be because of OMODE's hack which will be unconditionally reverted after the mode change. Also, this matches old behaviour for users not being able to generate mode changes redundantly opping themselves. Note that this change should only be taken advantage of if all servers run patched code. Otherwise, mode changes will be silently dropped and a desync results.
This commit is contained in:
parent
402cce0b9c
commit
fa0e215255
1 changed files with 3 additions and 0 deletions
|
@ -885,6 +885,9 @@ chm_op(struct Client *source_p, struct Channel *chptr,
|
|||
|
||||
if(dir == MODE_ADD)
|
||||
{
|
||||
if(targ_p == source_p && mstptr->flags & CHFL_CHANOP)
|
||||
return;
|
||||
|
||||
mode_changes[mode_count].letter = c;
|
||||
mode_changes[mode_count].dir = MODE_ADD;
|
||||
mode_changes[mode_count].caps = 0;
|
||||
|
|
Loading…
Reference in a new issue