]> jfr.im git - irc/rqf/shadowircd.git/blob - unsupported/sno_channeljoin.c
9a9831f575d44a4eec0f72d39f509c703a944551
[irc/rqf/shadowircd.git] / unsupported / sno_channeljoin.c
1 /*
2 * +j snomask: Channel join notices.
3 * --nenolod
4 *
5 * To be discussed:
6 * + part notices?
7 *
8 * $Id: sno_channeljoin.c 3478 2007-05-24 15:10:06Z jilles $
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
45 DECLARE_MODULE_AV1(sno_channeljoin, init, fini, NULL, NULL, channeljoin_hfnlist, "$Revision: 3478 $");