Delay setting the /cset CHANMODE mode on new channels until the channel is synched.

Instead of setting the mode at NAMES time (when we know that the channel is new),
remember this for later by setting the GOTNEW flag in the joinlist entry.  Then
check this flag when the channel is synched.

Setting the channel mode takes us out of server "grace mode", which slows down the 
processing of subsequent commands and drastically reduces the number of commands we
can have outstanding before we get kicked off for flooding.  This change allows us
to stay in grace mode while we're synching every channel that we joined at connect.

In turn, this makes joining lots of channels on connect faster, and much less likely
to cause us to be booted with "Excess Flood".


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@515 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2014-10-29 14:07:05 +00:00
parent 8054c3e4ab
commit db3fabfc3e
4 changed files with 34 additions and 19 deletions

View File

@@ -20,11 +20,13 @@
#define CHAN_NOUNLINK 1
#define CHAN_UNLINK 2
/* for got_mode */
#define GOTNAMES 0x01
#define GOTMODE 0x02
#define GOTBANS 0x04
#define GOTWHO 0x08
#define GOTEXEMPT 0x10
#define GOTNEW 0x20 /* Indicates newly-created channel */
/* Channel mode flags */
#define MODE_ANONYMOUS (1U << 0) /* av2.9 */