2 # Parent a8a86296d9e4fcda52b9e30a7ee275c8045444c6
4 diff -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
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);
16 diff -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
20 return exit_client(sptr, sptr, &me, "USER: Bogus userid.");
22 /* Check for K- or G-line. */
23 - killreason = find_kill(sptr);
24 + killreason = find_kill(sptr, 1);
26 ServerStats->is_ref++;
27 return exit_client(sptr, sptr, &me,
28 diff -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
32 * get past K/G's etc, we'll "fix" the bug by actually explaining
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).
48 -int find_kill(struct Client *cptr)
49 +int find_kill(struct Client *cptr, int glinecheck)
53 @@ -1084,7 +1085,13 @@
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.
64 + if (glinecheck && !feature_bool(FEAT_DISABLE_GLINES) && (agline = gline_lookup(cptr, 0))) {
67 * added a check against the user's IP address to find_gline() -Kev