2 * Remote client connect/exit notices on snomask +F (far).
3 * To avoid flooding, connects/exits part of netjoins/netsplits are not shown.
4 * Consequently, it is not possible to use these notices to keep track
19 static int _modinit(void);
20 static void _moddeinit(void);
21 static void h_gcn_new_remote_user(struct Client
*);
22 static void h_gcn_client_exit(hook_data_client_exit
*);
24 mapi_hfn_list_av1 gcn_hfnlist
[] = {
25 { "new_remote_user", (hookfn
) h_gcn_new_remote_user
},
26 { "client_exit", (hookfn
) h_gcn_client_exit
},
30 DECLARE_MODULE_AV1(globalconnexit
, _modinit
, _moddeinit
, NULL
, NULL
, gcn_hfnlist
, "$Revision: 1869 $");
35 /* add the snomask to the available slot */
36 snomask_modes
['F'] = find_snomask_slot();
38 /* show the fact that we are showing user information in /version */
39 opers_see_all_users
= 1;
47 /* disable the snomask and remove it from the available list */
48 snomask_modes
['F'] = 0;
52 h_gcn_new_remote_user(struct Client
*source_p
)
55 if (!HasSentEob(source_p
->servptr
))
57 sendto_realops_snomask_from(snomask_modes
['F'], L_ALL
, source_p
->servptr
,
58 "Client connecting: %s (%s@%s) [%s] {%s} [%s]",
59 source_p
->name
, source_p
->username
, source_p
->orighost
,
60 show_ip(NULL
, source_p
) ? source_p
->sockhost
: "255.255.255.255",
65 h_gcn_client_exit(hook_data_client_exit
*hdata
)
67 struct Client
*source_p
;
69 source_p
= hdata
->target
;
71 if (MyConnect(source_p
) || !IsClient(source_p
))
73 if (!HasSentEob(source_p
->servptr
))
75 sendto_realops_snomask_from(snomask_modes
['F'], L_ALL
, source_p
->servptr
,
76 "Client exiting: %s (%s@%s) [%s] [%s]",
78 source_p
->username
, source_p
->host
, hdata
->comment
,
79 show_ip(NULL
, source_p
) ? source_p
->sockhost
: "255.255.255.255");