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.
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;