]>
Commit | Line | Data |
---|---|---|
59e2698a | 1 | /* |
2 | * +j snomask: Channel join notices. | |
3 | * --nenolod | |
4 | * | |
5 | * To be discussed: | |
6 | * + part notices? | |
7 | * | |
59e2698a | 8 | */ |
9 | ||
10 | #include "stdinc.h" | |
11 | #include "modules.h" | |
12 | #include "hook.h" | |
13 | #include "client.h" | |
14 | #include "ircd.h" | |
15 | #include "send.h" | |
16 | ||
17 | static void | |
18 | show_channeljoin(hook_data_channel_activity *info) | |
19 | { | |
20 | sendto_realops_snomask(snomask_modes['j'], L_ALL, | |
21 | "%s (%s@%s) has joined channel %s", info->client->name, | |
22 | info->client->username, info->client->host, info->chptr->chname); | |
23 | } | |
24 | ||
25 | mapi_hfn_list_av1 channeljoin_hfnlist[] = { | |
26 | {"channel_join", (hookfn) show_channeljoin}, | |
27 | {NULL, NULL} | |
28 | }; | |
29 | ||
30 | static int | |
31 | init(void) | |
32 | { | |
33 | snomask_modes['j'] = find_snomask_slot(); | |
34 | ||
35 | return 0; | |
36 | } | |
37 | ||
38 | static void | |
39 | fini(void) | |
40 | { | |
41 | snomask_modes['j'] = 0; | |
42 | } | |
43 | ||
297c7db4 | 44 | DECLARE_MODULE_AV1(sno_channeljoin, init, fini, NULL, NULL, channeljoin_hfnlist, "$Revision: 3478 $"); |