Commit Graph

31 Commits

Author SHA1 Message Date
Ed Kellett b860ad5ffa
chmode: end the grace period more intelligently (#84)
We were ending the flood grace period for any channel mode command other
than `MODE #foo [bq]` by means of a hardcoded check. I've moved that to
after we parse the mode string, so we can correctly identify all
requests to change modes and end the grace period on exactly those.

It would have been entirely possible to move the check even further down
and flood_endgrace on only mode commands that *actually* change modes,
but I don't like the idea of making it sensitive to external conditions.
2020-11-30 09:24:32 +00:00
Simon Arlott 4b1cce65ed
ircd: send tags on every message
Simplify linebuf by introducing fsnprint to manage a list of printfs.
Add a msgbuf unparse cache for send functions that loop.
2017-08-06 16:21:29 +01:00
Elizabeth Myers 3c7d6fcce7 Message handlers should return void.
Also fix up some return values and stuff to use bool (or void if
nothing). I just did it whilst I was here.

According to jilles, the return value used to signify whether or not the
client had exited. This was error-prone and was fixed a long, long time
ago, but the return value was left int for historical reasons.

Since the return type is not used (and has no clear use case anyway),
it's safe to just get rid of it.
2016-03-09 01:37:03 -06:00
Elizabeth Myers eeabf33a7c Move module description headers to the top
This is cleaner.

Note this was broken out of a much larger piece of work I did, so if
there's any problems, I apologise!
2016-03-09 01:29:41 -06:00
Elizabeth Myers 07554369bd Detect stdbool.h and add conformant shims if it isn't available
Charybdis requires C99 already, so it's high time we start using
stdbool. I've converted a few pieces of code already.

A lot of the old code that uses YES/NO should probably be updated too
because that's fucking hideous.
2016-03-08 04:54:04 -06:00
Elizabeth Myers ee6dcb0514 Add more core module descriptions 2016-03-07 01:16:24 -06:00
Elizabeth Myers 105a4985b4 Migrate remaining modules to AV2
No descriptions yet. :(
2016-03-07 00:03:39 -06: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 7baa37a9ef msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag. 2016-02-19 16:43:39 -06:00
William Pitcock 428ca87b01 modules: chase MsgBuf API change 2016-02-10 20:54:17 -06:00
Valerii Iatsko 5203cba5ce Remove libratbox's snprintf.c, update related ircd code 2016-02-10 02:25:32 +01:00
William Pitcock c7b2fd3d66 MODE: allow 'q' banlist queries to bypass flood limits too 2015-12-28 00:48:46 -06:00
Jilles Tjoelker fea6157df0 Avoid possible null dereference. 2014-03-03 00:02:10 +01:00
Jilles Tjoelker d1316b193b Keep forward channels in sync after a netjoin.
Arbitrarily prefer a forward channel to no forward channel and an
alphabetically higher forward channel to a lower one.

This is a simplistic implementation that generates one MODE message to
local clients for each ban removed (to be replaced).

For simplicity and to avoid amplification of incoming MODE messages,
regular modes may still desync the forward channel of a ban.
2012-03-03 23:45:52 +01:00
Jilles Tjoelker c25a890796 Remove some TS5 code from ms_bmask().
ms_bmask() used to send MODE messages to TS5 servers, but
TS5 support was removed long ago.
2012-02-17 00:36:12 +01:00
Jilles Tjoelker 23f6b63af6 Send forward channel when bans are added/removed because of TS/bursts.
If a netburst adds bans or a channel TS change removes bans, +b/-b modes
are generated. Make sure these contain the forward channel, if any.

This appears also broken in ircd-seven.
2012-02-17 00:09:39 +01: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
William Pitcock 6fb6bd15ae Enforce TS rules on MLOCKs. 2010-08-23 20:22:59 -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
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
Jilles Tjoelker 161f040940 Update comments for parv[0] removal. 2009-01-18 18:22:43 +01: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
William Pitcock 4016731b1c s_log.* -> logger.* (s_foo looks ugly, lets try to get rid of it) 2008-04-02 21:52:01 -05:00
Valery Yatsko 81af5bcb39 libcharybdis includes gone. 2008-04-02 02:39:19 +04:00
William Pitcock 7cdb0a09b9 ircsprintf -> rb_sprintf 2008-04-01 15:21:53 -05:00
William Pitcock 5b96d9a6b9 start making this compile 2008-04-01 15:18:48 -05:00
William Pitcock aed5ce90a5 Remove CHFL_DEOPPED entirely.
Since charybdis 2.3 will require TS6, emulating legacy semantics is
unnecessary.
2008-02-27 14:08:27 -06:00
Jilles Tjoelker 81daf9555b Remove CHFL_DEOPPED check from TMODE.
This check sometimes blocks oper overrides (OMODE).
It does not stop any hacks that the channelTS check
already stops, because CHFL_DEOPPED is only set when
this server ignored an @ in an incoming SJOIN (the
SJOIN is then propagated without the @) and this
can only be because of a TS difference.
2008-02-25 00:05:15 +01:00
nenolod 212380e3f4 [svn] - the new plan:
+ branches/release-2.1 -> 2.2 base
  + 3.0 -> branches/cxxconversion
  + backport some immediate 3.0 functionality for 2.2
  + other stuff
2007-01-24 22:40:21 -08:00