]> jfr.im git - solanum.git/blobdiff - extensions/sno_globalkline.c
filter: drop messages if we're ACT_KILLing them
[solanum.git] / extensions / sno_globalkline.c
index 487044ec09e523c8cd0072aadb4ccea11344fd4a..0b3285b2a9d02e0b9e612dad9182bd971dc2ef9c 100644 (file)
@@ -5,8 +5,6 @@
  * and kline_reason is enabled and the same everywhere.
  * Yes, this is a hack, but it is simple and avoids sending
  * more data across servers -- jilles
- *
- * $Id: sno_globalkline.c 613 2006-01-29 03:03:02Z nenolod $
  */
 
 #include "stdinc.h"
@@ -17,6 +15,9 @@
 #include "send.h"
 #include "s_conf.h"
 
+static const char sno_desc[] =
+       "Adds server notices for global XLINEs, KLINEs, and DLINEs";
+
 static void h_gla_client_exit(hook_data_client_exit *);
 
 mapi_hfn_list_av1 gla_hfnlist[] = {
@@ -24,7 +25,7 @@ mapi_hfn_list_av1 gla_hfnlist[] = {
        { NULL, NULL }
 };
 
-DECLARE_MODULE_AV1(globallineactive, NULL, NULL, NULL, NULL, gla_hfnlist, "$Revision: 613 $");
+DECLARE_MODULE_AV2(globallineactive, NULL, NULL, NULL, NULL, gla_hfnlist, NULL, NULL, sno_desc);
 
 static void
 h_gla_client_exit(hook_data_client_exit *hdata)
@@ -48,4 +49,16 @@ h_gla_client_exit(hook_data_client_exit *hdata)
                                "K/DLINE active for %s[%s@%s]",
                                source_p->name, source_p->username, source_p->host);
        }
+       else if (!strncmp(hdata->comment, "Temporary K-line ", 17))
+       {
+               sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
+                               "K/DLINE active for %s[%s@%s]",
+                               source_p->name, source_p->username, source_p->host);
+       }
+       else if (!strncmp(hdata->comment, "Temporary D-line ", 17))
+       {
+               sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
+                               "K/DLINE active for %s[%s@%s]",
+                               source_p->name, source_p->username, source_p->host);
+       }
 }