]> jfr.im git - solanum.git/blame - include/hook.h
Add default for disable_local_channels. Missed this last time.
[solanum.git] / include / hook.h
CommitLineData
212380e3
AC
1/*
2 * Copyright (C) 2004-2005 Lee Hardy <lee -at- leeh.co.uk>
3 * Copyright (C) 2004-2005 ircd-ratbox development team
4 *
5 * $Id: hook.h 906 2006-02-21 02:25:43Z nenolod $
6 */
7#ifndef INCLUDED_HOOK_H
8#define INCLUDED_HOOK_H
9
10typedef struct
11{
12 char *name;
5b96d9a6 13 rb_dlink_list hooks;
212380e3
AC
14} hook;
15
16typedef void (*hookfn) (void *data);
17
2e819b6b
JT
18extern int h_iosend_id;
19extern int h_iorecv_id;
20extern int h_iorecvctrl_id;
212380e3 21
2e819b6b
JT
22extern int h_burst_client;
23extern int h_burst_channel;
24extern int h_burst_finished;
25extern int h_server_introduced;
26extern int h_server_eob;
27extern int h_client_exit;
28extern int h_umode_changed;
29extern int h_new_local_user;
30extern int h_new_remote_user;
31extern int h_introduce_client;
5f8d323c 32extern int h_can_kick;
212380e3
AC
33
34void init_hook(void);
35int register_hook(const char *name);
36void add_hook(const char *name, hookfn fn);
37void remove_hook(const char *name, hookfn fn);
38void call_hook(int id, void *arg);
39
40typedef struct
41{
42 struct Client *client;
43 const void *arg1;
44 const void *arg2;
45} hook_data;
46
47typedef struct
48{
49 struct Client *client;
50 const void *arg1;
51 int arg2;
52} hook_data_int;
53
54typedef struct
55{
56 struct Client *client;
57 struct Client *target;
58} hook_data_client;
59
60typedef struct
61{
62 struct Client *client;
63 struct Channel *chptr;
64 int approved;
65} hook_data_channel;
66
67typedef struct
68{
69 struct Client *client;
70 struct Channel *chptr;
71 char *key;
72} hook_data_channel_activity;
73
5f8d323c
AC
74typedef struct
75{
76 struct Client *client;
77 struct Channel *chptr;
6ca4dec9 78 struct membership *msptr;
5f8d323c
AC
79 struct Client *target;
80 int approved;
81} hook_data_channel_approval;
82
212380e3
AC
83typedef struct
84{
85 struct Client *client;
86 int approved;
87} hook_data_client_approval;
88
89typedef struct
90{
91 struct Client *local_link; /* local client originating this, or NULL */
92 struct Client *target; /* dying client */
93 struct Client *from; /* causing client (could be &me or target) */
94 const char *comment;
95} hook_data_client_exit;
96
97typedef struct
98{
99 struct Client *client;
100 unsigned int oldumodes;
101 unsigned int oldsnomask;
102} hook_data_umode_changed;
103
104#endif