]> jfr.im git - irc/freenode/solanum.git/commit
Rework channel mode handling
authorEd Kellett <redacted>
Thu, 5 Nov 2020 16:31:57 +0000 (16:31 +0000)
committerEd Kellett <redacted>
Sun, 8 Nov 2020 00:26:27 +0000 (00:26 +0000)
commit04952c32ad485a36c1ddeace43973d630b7acaf1
treeafa6fdf0a505869086397b467fa5d53bd912b674
parentb5c8d52d8267b48991e721680c6747decef3c945
Rework channel mode handling

Incoming MODE processing is split into a parsing step and an execution
step, instead of a mode's effector function being involved in its own
parsing. Modes can no longer use custom logic to control their parsing,
and instead supply a combination of CHM_* flags to the parser. As a
result, we know before we try to effect any mode changes what all of
them will be.

The reauthorize hack for override is no longer necessary. A side effect
of its introduction was that `MODE #foo b x!y@z` no longer worked; in
removing it we restore that behaviour.

We gain the ability to reject various invalid inputs that:
- mutate or query unknown modes
- supply excess mode arguments
- query modes that can't be queried

In each case, whether we *should* reject it is an open question; for now
I'm rejecting the first one.
extensions/chm_operonly_compat.c
extensions/chm_quietunreg_compat.c
extensions/chm_sslonly_compat.c
include/channel.h
include/chmode.h
ircd/chmode.c