]> jfr.im git - solanum.git/blobdiff - extensions/sno_farconnect.c
explicitly show IP in SNO_BANNED snotes
[solanum.git] / extensions / sno_farconnect.c
index 36e2dbaea715b4f59d6dcb541b1bf9a9868af20a..780783d5dc90cb23fca9f9c1fef18e35d407fb26 100644 (file)
 #include "s_conf.h"
 #include "snomask.h"
 
+static const char sno_desc[] =
+       "Adds server notice mask +F that allows operators to receive notices for connections on other servers";
+
 static int _modinit(void);
 static void _moddeinit(void);
-static void h_gcn_new_remote_user(struct Client *);
-static void h_gcn_client_exit(hook_data_client_exit *);
+static void h_gcn_new_remote_user(void *);
+static void h_gcn_client_exit(void *);
 
 mapi_hfn_list_av1 gcn_hfnlist[] = {
-       { "new_remote_user", (hookfn) h_gcn_new_remote_user },
-       { "client_exit", (hookfn) h_gcn_client_exit },
+       { "new_remote_user", h_gcn_new_remote_user },
+       { "client_exit", h_gcn_client_exit },
        { NULL, NULL }
 };
 
-static const char sno_desc[] =
-       "Adds server notice mask +F that allows operators to receive notices for connections on other servers";
-
 DECLARE_MODULE_AV2(globalconnexit, _modinit, _moddeinit, NULL, NULL, gcn_hfnlist, NULL, NULL, sno_desc);
 
 static int
@@ -38,7 +38,7 @@ _modinit(void)
        snomask_modes['F'] = find_snomask_slot();
 
        /* show the fact that we are showing user information in /version */
-       opers_see_all_users = 1;
+       opers_see_all_users = true;
 
        return 0;
 }
@@ -51,21 +51,24 @@ _moddeinit(void)
 }
 
 static void
-h_gcn_new_remote_user(struct Client *source_p)
+h_gcn_new_remote_user(void *data)
 {
+       struct Client *source_p = data;
 
        if (!HasSentEob(source_p->servptr))
                return;
        sendto_realops_snomask_from(snomask_modes['F'], L_ALL, source_p->servptr,
-                       "Client connecting: %s (%s@%s) [%s] {%s} [%s]",
+                       "Client connecting: %s (%s@%s) [%s] {%s} <%s> [%s]",
                        source_p->name, source_p->username, source_p->orighost,
                        show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255",
-                       "?", source_p->info);
+                       "?", *source_p->user->suser ? source_p->user->suser : "*",
+                       source_p->info);
 }
 
 static void
-h_gcn_client_exit(hook_data_client_exit *hdata)
+h_gcn_client_exit(void *data)
 {
+       hook_data_client_exit *hdata = data;
        struct Client *source_p;
 
        source_p = hdata->target;