Commit graph

73 commits

Author SHA1 Message Date
William Pitcock
1e8138afb0 channel: actually, use bancache invalidation as the metric for the duplication check
any state change which would cause the duplicate check to change would invalidate bancache as a whole anyway
2015-12-13 08:17:04 -06:00
William Pitcock
2f9687c48c channel: cache duplicate calls to is_banned() and is_quieted() 2015-12-13 08:13:52 -06:00
William Pitcock
202d496644 override: only engage override code if we're needing to authorize a WRITE to a channel's state (closes #65) 2015-12-10 01:00:32 -06:00
Max Teufel
1b54aa5c3b src/channel: add support for IRCv3.2 userhost-in-names 2015-02-28 01:06:38 -06:00
Jilles Tjoelker
51452a370b channel: Stop pretending to support per-mode server capabilities.
After a change for dynamic server capabilities, the code to send out mode
changes was changed to use the capabilities belonging to the last mode
being sent out. This does not make sense; therefore, just use no
capabilities and remove supporting infrastructure.
2014-05-29 17:40:16 +02:00
Keith Buck
55abcbb20a Remove trailing whitespace from all .c and .h files.
3134 bytes were removed.
2014-03-03 04:25:47 +00:00
Keith Buck
77d3d2dbaf Remove s_assert definition from ircd_defs.h and add it to its own header.
s_assert requires some higher-level functionality that shouldn't be
present in ircd_defs.h. ircd_defs.h is used by ssld, which has no notion
of logging or sending IRC messages. Additionally, some of the headers
s_assert depends on result in conflicting definitions in ssld.c.

This change also fixes the compile when using --enable-assert=soft.
2013-09-10 06:10:14 +00:00
Keith Buck
c5bbc60375 Add away-notify client capability. 2012-02-14 14:15:44 +00:00
William Pitcock
346fba9252 Migrate capability negotiation code to new dynamic capability management API.
This needs a lot of testing, obviously.
2012-02-04 01:47:46 -06:00
Jilles Tjoelker
1c60de9757 Check +bq against underlying IPv4 as well.
As with k/dlines, exceptions (here +eI) are not checked.
2012-01-08 16:39:11 +01:00
Jilles Tjoelker
fe74401bf0 Add one more const. 2012-01-08 16:25:34 +01:00
Jilles Tjoelker
d9af501aa8 Fix a warning about const with forward channels. 2012-01-08 16:23:18 +01:00
Jilles Tjoelker
a14de124d6 Remove code duplication between is_banned() and is_quieted(). 2012-01-08 16:21:07 +01:00
Jilles Tjoelker
2da6f6ebd7 Put back use_forward. 2011-09-25 16:22:29 +02: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
William Pitcock
ae79dab6ae chanroles: grant initial set of flags to people added to a channel with CHFL_CHANOP.
this allows us to, later on, add a hook that will enable us to disable channel ops entirely
without causing permissions revocation.
2011-07-06 15:00:32 -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
Elizabeth Jennifer Myers
f4b52a0ad3 can_send: properly initalise moduledata. 2011-02-13 09:50:25 -05:00
Jilles Tjoelker
26e9dd93ad Remove nickTS from extended-join. 2011-01-11 00:26:15 +01:00
William Pitcock
92052a5c24 Add extended-join client capability.
The extended-join client capability extends the JOIN message with information clients typically
query using WHO including accountname, signon TS and realname.
2010-12-16 00:24:54 -06:00
William Pitcock
27912fd4ff Add send_channel_join(). 2010-12-16 00:09:29 -06:00
William Pitcock
b697041e2a Don't bother running the can_send() hook if we're not on the channel. 2010-12-14 22:57:23 -06:00
William Pitcock
e06988c6de Fix regressions in can_send() caused by hooking it for override and modularized channel modules. 2010-12-11 20:21:47 -06:00
B.Greenham
15484f02bd Move flood_attack_channel to channel.c so it can be used outside m_message.c 2010-12-09 18:29:56 -05:00
William Pitcock
0aa36c5f0f Add can_send hook. 2010-12-07 00:09:46 -06:00
William Pitcock
8bb19bd7ab Make the can_join hook more flexible. 2010-12-06 23:52:44 -06:00
William Pitcock
749d8c11dd Add a hook for get_channel_access(). 2010-12-06 22:57:28 -06:00
William Pitcock
a63f7af7bb Note that can_join() is not remote-user safe. 2010-08-29 14:07:44 -05:00
Stephen Bennett
c71a6e3bed Branch merge 2010-05-02 21:36:32 +01:00
Stephen Bennett
3b8a6350f8 Backed out changeset c57955c5225e
Now that MLOCK is no longer stored as a struct Mode, this is unnecessary.
2010-05-02 21:29:22 +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
dca9e55257 Add propagated resvs, like klines and xlines. 2010-03-27 16:13:57 +01: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
William Pitcock
a51c452643 Rename channel_modes() to channel_modes_real(), and use macros to build both the mode list, and the mlock list. 2010-03-07 22:22:14 -06:00
Jilles Tjoelker
981586df2b spambot checks: Fix excessive expiry in some cases. 2010-02-21 01:29:41 +01:00
Jilles Tjoelker
e0c1f4ecab Show spambot notices for joins, not for parts.
Parts still decrement the counter for showing notices.
This shows more channels in the notices.
2008-11-08 17:22:41 +01: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
Jilles Tjoelker
6a30990367 Reset check_splitmode_ev to NULL after removing it,
to exclude the possibility of it being removed twice.
like ircd-ratbox r25641 (jilles)
reverts 788:476d29d84191
2008-06-29 01:37:11 +02:00
Valery V Yatsko
b4407833bd Remove Channel->users_last, used nowhere 2008-06-28 12:25:53 +04:00
Valery V Yatsko
18e4d42137 'struct config_channel_entry ConfigChannel' in channel.c too 2008-06-28 12:02:51 +04:00
Valery V Yatsko
c3d1034381 'rb_dlink_list global_channel_list' declaration moved to channel.c 2008-06-28 12:00:01 +04:00
Valery V Yatsko
b617afdc02 channel_heap,ban_heap,topic_heap,member_heap declared statically in channel.c instead of ircd.{c,h} 2008-06-28 11:54:51 +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
fd44b8518a Unbreak sending out bans and simple modes with parameters. 2008-06-13 22:21:44 +02:00
William Pitcock
469c9689c1 More TS6 special cases simplified. 2008-06-08 02:16:43 -05:00
Jilles Tjoelker
896755fe0d Move some declarations to header files, this enforces that they match. 2008-04-20 15:30:24 +02: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