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