]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_gline.c
Add resv oper priv, enabled by default for compatibility.
[irc/rqf/shadowircd.git] / modules / m_gline.c
index 92d87d2e41706e288826536fac6995074591ef79..f2d08705de0169a1f018f399bb1f87fb79d9f3be 100644 (file)
@@ -47,6 +47,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "s_log.h"
+#include "reject.h"
 
 static int mo_gline(struct Client *, struct Client *, int, const char **);
 static int mc_gline(struct Client *, struct Client *, int, const char **);
@@ -651,7 +652,7 @@ majority_gline(struct Client *source_p, const char *user,
                                strlcpy(pending->oper_host2, source_p->host,
                                        sizeof(pending->oper_host2));
                                DupString(pending->reason2, reason);
-                               pending->oper_server2 = find_or_add(source_p->servptr->name);
+                               pending->oper_server2 = scache_get_name(source_p->servptr->serv->nameinfo);
                                pending->last_gline_time = CurrentTime;
                                pending->time_request2 = CurrentTime;
                                return NO;
@@ -670,7 +671,7 @@ majority_gline(struct Client *source_p, const char *user,
        strlcpy(pending->oper_host1, source_p->host,
                sizeof(pending->oper_host1));
 
-       pending->oper_server1 = find_or_add(source_p->servptr->name);
+       pending->oper_server1 = scache_get_name(source_p->servptr->serv->nameinfo);
 
        strlcpy(pending->user, user, sizeof(pending->user));
        strlcpy(pending->host, host, sizeof(pending->host));
@@ -722,6 +723,7 @@ remove_temp_gline(const char *user, const char *host)
                        continue;
 
                dlinkDestroy(ptr, &glines);
+               remove_reject_mask(aconf->user, aconf->host);
                delete_one_address_conf(aconf->host, aconf);
                return YES;
        }