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
8 * $Id: sno_farconnect.c 1869 2006-08-27 14:24:25Z jilles $
20 static int _modinit(void);
21 static void _moddeinit(void);
22 static void h_gcn_new_remote_user(struct Client
*);
23 static void h_gcn_client_exit(hook_data_client_exit
*);
25 mapi_hfn_list_av1 gcn_hfnlist
[] = {
26 { "new_remote_user", (hookfn
) h_gcn_new_remote_user
},
27 { "client_exit", (hookfn
) h_gcn_client_exit
},
31 DECLARE_MODULE_AV1(globalconnexit
, _modinit
, _moddeinit
, NULL
, NULL
, gcn_hfnlist
, "$Revision: 1869 $");
36 /* add the snomask to the available slot */
37 snomask_modes
['F'] = find_snomask_slot();
39 /* show the fact that we are showing user information in /version */
40 opers_see_all_users
= 1;
48 /* disable the snomask and remove it from the available list */
49 snomask_modes
['F'] = 0;
53 h_gcn_new_remote_user(struct Client
*source_p
)
56 if (!HasSentEob(source_p
->servptr
))
58 sendto_realops_snomask_from(snomask_modes
['F'], L_ALL
, source_p
->servptr
,
59 "Client connecting: %s (%s@%s) [%s] {%s} [%s]",
60 source_p
->name
, source_p
->username
, source_p
->orighost
,
61 show_ip(NULL
, source_p
) ? source_p
->sockhost
: "255.255.255.255",
66 h_gcn_client_exit(hook_data_client_exit
*hdata
)
68 struct Client
*source_p
;
70 source_p
= hdata
->target
;
72 if (MyConnect(source_p
) || !IsClient(source_p
))
74 if (!HasSentEob(source_p
->servptr
))
76 sendto_realops_snomask_from(snomask_modes
['F'], L_ALL
, source_p
->servptr
,
77 "Client exiting: %s (%s@%s) [%s] [%s]",
79 source_p
->username
, source_p
->host
, hdata
->comment
,
80 show_ip(NULL
, source_p
) ? source_p
->sockhost
: "255.255.255.255");