]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - rehash
nickgline: include nick! bit in gline loggin
[irc/quakenet/snircd-patchqueue.git] / rehash
CommitLineData
edb26b39
P
1# HG changeset patch
2# Parent a8a86296d9e4fcda52b9e30a7ee275c8045444c6
3
4diff -r a8a86296d9e4 include/s_conf.h
5--- a/include/s_conf.h Sat Jul 13 23:26:11 2013 +0100
6+++ b/include/s_conf.h Sat Jul 13 23:40:05 2013 +0100
7@@ -181,7 +181,7 @@
8 extern enum AuthorizationCheckResult conf_check_client(struct Client *cptr);
9 extern int conf_check_server(struct Client *cptr);
10 extern int rehash(struct Client *cptr, int sig);
11-extern int find_kill(struct Client *cptr);
12+extern int find_kill(struct Client *cptr, int glinecheck);
13 extern const char *find_quarantine(const char* chname);
14 extern void lookup_confhost(struct ConfItem *aconf);
15 extern void conf_parse_userhost(struct ConfItem *aconf, char *host);
16diff -r a8a86296d9e4 ircd/s_auth.c
17--- a/ircd/s_auth.c Sat Jul 13 23:26:11 2013 +0100
18+++ b/ircd/s_auth.c Sat Jul 13 23:40:05 2013 +0100
19@@ -267,7 +267,7 @@
20 return exit_client(sptr, sptr, &me, "USER: Bogus userid.");
21
22 /* Check for K- or G-line. */
23- killreason = find_kill(sptr);
24+ killreason = find_kill(sptr, 1);
25 if (killreason) {
26 ServerStats->is_ref++;
27 return exit_client(sptr, sptr, &me,
28diff -r a8a86296d9e4 ircd/s_conf.c
29--- a/ircd/s_conf.c Sat Jul 13 23:26:11 2013 +0100
30+++ b/ircd/s_conf.c Sat Jul 13 23:40:05 2013 +0100
31@@ -983,7 +983,7 @@
32 * get past K/G's etc, we'll "fix" the bug by actually explaining
33 * whats going on.
34 */
35- if ((found_g = find_kill(acptr))) {
36+ if ((found_g = find_kill(acptr, 0))) {
37 sendto_opmask_butone(0, found_g == -2 ? SNO_GLINE : SNO_OPERKILL,
38 found_g == -2 ? "G-line active for %s%s" :
39 "K-line active for %s%s",
40@@ -1034,10 +1034,11 @@
41 /** Searches for a K/G-line for a client. If one is found, notify the
42 * user and disconnect them.
43 * @param cptr Client to search for.
44+ * @param glinecheck Whether we check for glines.
45 * @return 0 if client is accepted; -1 if client was locally denied
46 * (K-line); -2 if client was globally denied (G-line).
47 */
48-int find_kill(struct Client *cptr)
49+int find_kill(struct Client *cptr, int glinecheck)
50 {
51 const char* host;
52 const char* name;
53@@ -1084,7 +1085,13 @@
54 return -1;
55 }
56
57- if (!feature_bool(FEAT_DISABLE_GLINES) && (agline = gline_lookup(cptr, 0))) {
58+ /* added glinecheck to define if we check for glines too, shouldn't happen
59+ * when rehashing as it is causing problems with big servers and lots of glines.
60+ * Think of a 18000 user leaf with 18000 glines present, this will probably
61+ * cause the server to split from the net.
62+ * -skater_x
63+ */
64+ if (glinecheck && !feature_bool(FEAT_DISABLE_GLINES) && (agline = gline_lookup(cptr, 0))) {
65 /*
66 * find active glines
67 * added a check against the user's IP address to find_gline() -Kev