]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - opersendq.patch
Remove topic_reveal.patch. This has been fixed in IRCU and ircu patch is correct...
[irc/quakenet/snircd-patchqueue.git] / opersendq.patch
1 # HG changeset patch
2 # Parent 6c1e0a6d0283dbbc3aeef7884308bd4223611c0d
3
4 diff -r 6c1e0a6d0283 ircd/parse.c
5 --- a/ircd/parse.c Sat Jul 13 23:24:56 2013 +0100
6 +++ b/ircd/parse.c Sat Jul 13 23:26:11 2013 +0100
7 @@ -882,8 +882,14 @@
8 paramcount = mptr->parameters;
9 i = bufend - ((s) ? s : ch);
10 mptr->bytes += i;
11 - if ((mptr->flags & MFLG_SLOW) || !IsAnOper(cptr))
12 - cli_since(cptr) += (2 + i / 120);
13 + if ((mptr->flags & MFLG_SLOW) || !IsAnOper(cptr)) {
14 + if (IsAnOper(cptr)) {
15 + cli_since(cptr) += 1;
16 + } else {
17 + cli_since(cptr) += (2 + i / 120);
18 + }
19 + }
20 +
21 /*
22 * Allow only 1 msg per 2 seconds
23 * (on average) to prevent dumping.
24 diff -r 6c1e0a6d0283 ircd/s_bsd.c
25 --- a/ircd/s_bsd.c Sat Jul 13 23:24:56 2013 +0100
26 +++ b/ircd/s_bsd.c Sat Jul 13 23:26:11 2013 +0100
27 @@ -575,7 +575,7 @@
28 unsigned int length = 0;
29
30 if (socket_ready &&
31 - !(IsUser(cptr) &&
32 + !(IsUser(cptr) && !IsOper(cptr) &&
33 DBufLength(&(cli_recvQ(cptr))) > feature_int(FEAT_CLIENT_FLOOD))) {
34 switch (os_recv_nonb(cli_fd(cptr), readbuf, sizeof(readbuf), &length)) {
35 case IO_SUCCESS:
36 @@ -615,8 +615,11 @@
37 if (length > 0 && dbuf_put(&(cli_recvQ(cptr)), readbuf, length) == 0)
38 return exit_client(cptr, cptr, &me, "dbuf_put fail");
39
40 - if (DBufLength(&(cli_recvQ(cptr))) > feature_int(FEAT_CLIENT_FLOOD))
41 + if (IsUser(cptr)) {
42 + if (DBufLength(&(cli_recvQ(cptr))) > feature_int(FEAT_CLIENT_FLOOD)
43 + && !IsOper(cptr))
44 return exit_client(cptr, cptr, &me, "Excess Flood");
45 + }
46
47 while (DBufLength(&(cli_recvQ(cptr))) && !NoNewLine(cptr) &&
48 (IsTrusted(cptr) || cli_since(cptr) - CurrentTime < 10))