]> jfr.im git - irc/rqf/shadowircd.git/blame - unsupported/sno_channeljoin.c
Backed out changeset c04f6578869c
[irc/rqf/shadowircd.git] / unsupported / sno_channeljoin.c
CommitLineData
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
17static void
18show_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
25mapi_hfn_list_av1 channeljoin_hfnlist[] = {
26 {"channel_join", (hookfn) show_channeljoin},
27 {NULL, NULL}
28};
29
30static int
31init(void)
32{
33 snomask_modes['j'] = find_snomask_slot();
34
35 return 0;
36}
37
38static void
39fini(void)
40{
41 snomask_modes['j'] = 0;
42}
43
297c7db4 44DECLARE_MODULE_AV1(sno_channeljoin, init, fini, NULL, NULL, channeljoin_hfnlist, "$Revision: 3478 $");