X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_w.cpp;h=8cfbf8fd24df6d9cab091cbba0cec6b88a386c10;hb=354cf0401283c67a6cf8962dfb55fc0558662cdd;hp=9115a67862132911759ef1e9eb298a26fae7e977;hpb=d40e1e5b0b8c4b94359637921387cd80e9de991b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp index 9115a6786..8cfbf8fd2 100644 --- a/src/modes/umode_w.cpp +++ b/src/modes/umode_w.cpp @@ -12,14 +12,15 @@ ModeAction ModeUserWallops::OnModeChange(userrec* source, userrec* dest, chanrec { /* Only opers can change other users modes */ if ((source != dest) && (!*source->oper)) - return MODEACTION_ALLOW; + return MODEACTION_DENY; /* Set the bitfields */ - adding ? dest->modebits |= UM_WALLOPS : dest->modebits &= ~UM_WALLOPS; - - /* Use the bitfields to build the user's mode string */ - ModeParser::BuildModeString(dest); + if (dest->modes[UM_WALLOPS] != adding) + { + dest->modes[UM_WALLOPS] = adding; + return MODEACTION_ALLOW; + } /* Allow the change */ - return MODEACTION_ALLOW; + return MODEACTION_DENY; }