Commit graph

66 commits

Author SHA1 Message Date
William Pitcock 67aeaba593 Remove MODE_NOCOLOR from core, replacing it with modules/chm_nocolour.so. 2012-03-31 22:26:45 -05:00
Keith Buck 3e910a1847 chmode.c: Fix bug in printing removed bans. 2012-02-06 16:38:10 +00:00
Jilles Tjoelker be0365e152 Add an error message if a ban mask is invalid.
This is given if the ban mask is too long, it is an invalid extban or the
forward channel is invalid and no other message has been given about that.
2011-12-18 23:24:22 +01:00
Jilles Tjoelker f2edb2be59 Disallow '$' in forward targets only, rather than all channel names. 2011-12-11 16:56:37 +01:00
Jilles Tjoelker e238d01db9 If use_forward is off, ignore forwarding bans rather than stripping the channel.
We do not want to set $r:* if $r:*$* was requested.
2011-12-10 17:17:13 +01:00
Jilles Tjoelker 5efa7ef677 Do not allow forward channels for +qeI, as in ircd-seven. 2011-12-10 00:58:08 +01:00
Jilles Tjoelker e1dc9e549f Apply the same restrictions to ban forwarding as to +f. 2011-12-10 00:45:57 +01:00
Jilles Tjoelker 0c7303213e Move checks for forward channels to a separate function.
No functional change is intended.
2011-12-10 00:40:07 +01:00
Jilles Tjoelker c55b2782fc Properly update 004/005 when a rehash changes use_forward. 2011-10-25 00:38:27 +02:00
Stephen Bennett 717f809762 Don't treat +r specially when displaying supported channel modes.
This used to be only advertised if a service was linked, which made
sense in ratbox when +r was only settable if services were available.
Now, however, +r is always available and so should always be advertised.
2011-10-24 19:59:31 +01:00
Jilles Tjoelker 1aa35c8af1 Make sure to check the length of a ban mask before removing a forward channel.
Otherwise a line might be truncated later, leading to desyncs.
2011-09-25 16:25:17 +02:00
Jilles Tjoelker 2da6f6ebd7 Put back use_forward. 2011-09-25 16:22:29 +02:00
Jilles Tjoelker 93fbe9c349 Fix double-free when removing a ban.
del_id() should not free the ban anymore, its caller does that now.
2011-09-14 00:52:56 +02:00
Elizabeth Jennifer Myers 25ea5d2fac Fix git fuckery.
Apparently my tree got horribly corrupted.
2011-08-12 21:27:52 -04:00
Elizabeth Jennifer Myers 73d0f900c0 chmode: fix construct_cflags_strings.
Accidentally ported too much from ircd-seven. Fix this.
2011-08-12 21:09:13 -04:00
Elizabeth Jennifer Myers 765d839d3c Port ircd-seven banfowards to charybdis.
nenolod gave the thumbs-up to port ircd-seven banfowards to charybdis to spb
for a while, and people have asked about it. Might as well do it since it's a
slow weekend.

Note that as a side effect use_forward is removed from the config and
unconditionally enabled!
2011-08-12 20:33:10 -04:00
Elizabeth Jennifer Myers 7eec45bc9d Back out chanroles.
While what chanroles are trying to accomplish is a good idea, it is
apparently unclear this is the proper way to do it. Until we figure out
the exact way we wish to do this, it should be reverted for now.
2011-07-07 21:24:14 -04:00
Elizabeth Jennifer Myers e794d39a80 Add client interface for GRANT.
TODO: implement notifications of grant privilege changes to the target.
2011-07-06 17:25:26 -04:00
William Pitcock f3bfe2c271 chanroles: instead of checking for chanop + CHANROLE_UNSET combination, grant a default set of flags.
this allows ops with zero effective privilege.
2011-07-06 15:12:46 -05:00
Elizabeth Jennifer Myers 8aabb973c0 Implement chanroles, as discussed with nenolod.
The theory behind this is that services sends an ENCAP * GRANT #channel
UID :+flagspec message specifying the chanroles the user has. They are
mapped into flag bits and applied to the membership of the user. They
then are restricted or permitted to what they can do based on the
permissions mask regardless of rank.

For backwards compatibility, the default permission bit (without a GRANT
statement) allows a user to to anything an existing op can do ONLY if
they are an op.

Todo: make CHANROLE_STATUS work (the ability to apply +ov to people),
which is at the moment controlled by CHANROLE_MODE.
2011-07-06 13:46:22 -04:00
Jilles Tjoelker fa0e215255 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.
2010-12-31 02:43:16 +01:00
William Pitcock 402cce0b9c Remove stupid hybrid-esque 'impossible to op yourself' hack.
Who the fuck thought that check was a good idea?
2010-12-30 19:21:14 -06:00
William Pitcock 96d2612765 Don't bother running the get_channel_access hook if the client is not really on the channel. 2010-12-14 23:04:11 -06:00
William Pitcock 3c52f289b1 Actually make get_channel_access() public. 2010-12-07 00:12:36 -06:00
William Pitcock 749d8c11dd Add a hook for get_channel_access(). 2010-12-06 22:57:28 -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 6917ed0eba Send only one ERR_MLOCKRESTRICTED per MODE command.
This agrees with other error messages from MODE.
2010-08-24 23:03:23 +02:00
William Pitcock 6fb6bd15ae Enforce TS rules on MLOCKs. 2010-08-23 20:22:59 -05:00
William Pitcock 01ed04abaf Send numeric 735 on MLOCK policy-restricted mode changes that are ignored. 2010-08-23 19:04:46 -05:00
Stephen Bennett 6b8db2daf2 Allow the final parameter of MLOCK to be empty, to remove an existing mlock 2010-05-02 20:42:46 +01:00
Stephen Bennett 78e6b731e4 Rework ircd-side MLOCK enforcement: instead of trying to track modes locked on or off, instead keep a simple list of mode letters that are locked, and reject any change to those modes. 2010-04-30 22:01:21 +01: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
William Pitcock f02f338b31 chm_simple(): enforce MLOCK 2010-03-07 23:15:52 -06:00
William Pitcock 8727cbe88a Add propagation of MLOCK state for simple modes.
Special modes like +j can be tracked easily just by adding the necessary
code to parse them to set_channel_mlock().  This will cover propagation
as well.
2010-03-07 23:13:39 -06:00
Alexander F?r?y 51027be825 Use RPL_QUIETLIST and RPL_ENDOFQUIETLIST instead of RPL_BANLIST and
RPL_ENDOFBANLIST for channel mode +q.
2010-02-27 01:08:41 +01:00
William Pitcock 2e918bf515 Merge +C (no CTCP to channels) from ircd-seven. 2010-01-19 02:11:04 -06:00
Stephen Bennett 179f024d18 / is a host character and not a nick character, so make pretty_mask treat it as such 2009-04-20 08:42:41 -05:00
Jilles Tjoelker a33bdd9fb6 Remove obsolete comment. 2009-01-25 21:02:04 +01: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 9bec26cc38 Merged find_orphaned_cflags and construct_noparam_modes in one function
as there's no reason to use them separetly
2008-06-25 07:13:58 +04:00
Valery V Yatsko f588b95674 New way of noparam mode search 2008-06-24 22:21:26 +04:00
Valery V Yatsko cbed45a2da New orphaned cflags implementation, now using chm_orphaned instead of
storing orphaned flags in a variable
2008-06-24 22:00:41 +04:00
Jilles Tjoelker d463189921 Fix some tracking for cmode +r. 2008-06-25 19:40:12 +02:00
Jilles Tjoelker 84c9a8c7be Fix limits on simple modes.
Formerly some mode strings like +svvvv were not accepted.
2008-06-25 19:27:30 +02: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
Jilles Tjoelker 2e819b6b3e Fix various compiler warnings. 2008-04-20 15:20:10 +02:00
Valery Yatsko 4562c60489 irc_string.h -> match.h, irc_string.h; includes changed 2008-04-20 09:47:38 +04:00
Valery Yatsko cbe4e1ba31 legacy irc sprintf gone 2008-04-20 09:12:09 +04:00