Commit graph

15 commits

Author SHA1 Message Date
Eric Mertens d295a3986d
Stop using chm_nosuch as a sentinel value (#53)
Remove chmode compat modules

This removes the need for chm_nosuch as well. Unknown mode detection happens in mode parsing now.
2020-11-08 09:50:17 -08:00
Eric Mertens 92c6e47b4a
Clean up duplication in ChannelModeFunc prototypes (#52) 2020-11-07 16:45:12 -08:00
Ed Kellett 04952c32ad 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.
2020-11-08 00:26:27 +00:00
Ed Kellett a6f63a829e
Innovation by sed 2020-10-15 15:52:41 +01:00
Elizabeth Myers cbeab4bc34 Remove $Id tags from everything.
These are obsolete and none have changed since 10 years gao...
2016-03-06 02:47:27 -06:00
William Pitcock be29ec793d ircd: import hidden channel modes framework, from ircd-seven
This allows for modules to define channel modes which are only visible to opers.
2016-01-13 16:34:27 -06:00
William Pitcock 83b72f917a chmode: Remove chm_regonly, a vestige from ratbox which doesn't apply to native charybdis networks. 2010-12-06 22:46:37 -06:00
Jilles Tjoelker 19716b9fd6 New custom channel mode API allowing reloading such modules.
Additionally, attempting to use too many modes or two times
the same letter is now detected and prevented.

Modules now request that a channel mode be added/orphaned,
instead of ugly manipulation from which that request had
to be guessed.

Slight changes are needed to modules that provide channel modes.
From the old API, one important function has been made static,
the other important function has been renamed, so loading old
modules should fail safely.
2010-04-01 01:16:16 +02:00
Valery V Yatsko 392ae75ca9 Moved extern chmode_flags declaration from channel.h to chmode.h, as
it's actually declared in the second one
2008-08-04 21:51:15 +04:00
Valery Yatsko acdf71d9d2 A very draft version of extensions, which are adding can_join hooks for custom channel modes 2008-07-27 12:10:48 +04:00
Valery V Yatsko c18cb68b91 Generating cflags bufs dynamically: one for RPL_MYINFO and one for
supported.c
2008-06-25 07:51:32 +04:00
Valery V Yatsko 33599ae783 Missed declaration of chm_orphaned 2008-06-24 22:08:24 +04:00
Valery V Yatsko 46d59e1138 A draft version of find_cmode_slot and orphaned concept for channel
flags
2008-06-24 21:26:49 +04:00
Valery V Yatsko efccc22c27 Applying dyn-cmodes.diff - first step in implementing channel module
addition in extensions
2008-06-24 20:45:19 +04:00
Valery Yatsko c84557ac70 chm_* declarations gone to chmode.h - this makes some modules clean 2008-04-08 23:39:35 +04:00