]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - freetargetandsilencecheckafterumodechecks.patch
refresh patches
[irc/quakenet/snircd-patchqueue.git] / freetargetandsilencecheckafterumodechecks.patch
CommitLineData
e1346dcb 1check usermode +R first, then +q, and then free target limits and last silence list
2
3dont use a free target when the message is going to be stopped by +R or +q
4dont check target limits and silence list until the end,
5which are probably more costly than +R/+q checks
6
7diff -r a6514af6df3d ircd/ircd_relay.c
8--- a/ircd/ircd_relay.c Wed Mar 24 12:31:16 2010 +0100
9+++ b/ircd/ircd_relay.c Wed Mar 24 12:59:31 2010 +0100
10@@ -393,10 +393,6 @@
11 send_reply(sptr, ERR_NOSUCHNICK, name);
12 return;
13 }
14- if ((!IsRealChannelService(acptr) &&
15- check_target_limit(sptr, acptr, cli_name(acptr), 0)) ||
16- is_silenced(sptr, acptr))
17- return;
18
19 /* ASUKA -- slug
20 * +R check, if target is +R and we're not +r (or opered) then
21@@ -413,6 +409,11 @@
22 return;
23 }
24
25+ if ((!IsRealChannelService(acptr) &&
26+ check_target_limit(sptr, acptr, cli_name(acptr), 0)) ||
27+ is_silenced(sptr, acptr))
28+ return;
29+
30 /*
31 * send away message if user away
32 */
33@@ -444,10 +445,6 @@
34
35 if (0 == (acptr = FindUser(name)))
36 return;
37- if ((!IsRealChannelService(acptr) &&
38- check_target_limit(sptr, acptr, cli_name(acptr), 0)) ||
39- is_silenced(sptr, acptr))
40- return;
41
42 /* ASUKA -- slug
43 * +R check, if target is +R and we're not +r (or opered) then
44@@ -460,6 +457,11 @@
45 if (IsCommonChansOnly(acptr) && !IsXtraOp(sptr) && !common_chan_count(acptr, sptr, 1))
46 return;
47
48+ if ((!IsRealChannelService(acptr) &&
49+ check_target_limit(sptr, acptr, cli_name(acptr), 0)) ||
50+ is_silenced(sptr, acptr))
51+ return;
52+
53 /*
54 * deliver the message
55 */