]> jfr.im git - irc/rqf/shadowircd.git/blame - unsupported/sno_channeljoin.c
Show D:line oper reason in /testline.
[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 *
297c7db4 8 * $Id: sno_channeljoin.c 3478 2007-05-24 15:10:06Z jilles $
59e2698a 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
18static void
19show_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
26mapi_hfn_list_av1 channeljoin_hfnlist[] = {
27 {"channel_join", (hookfn) show_channeljoin},
28 {NULL, NULL}
29};
30
31static int
32init(void)
33{
34 snomask_modes['j'] = find_snomask_slot();
35
36 return 0;
37}
38
39static void
40fini(void)
41{
42 snomask_modes['j'] = 0;
43}
44
297c7db4 45DECLARE_MODULE_AV1(sno_channeljoin, init, fini, NULL, NULL, channeljoin_hfnlist, "$Revision: 3478 $");