… | |
… | |
2 | * Copyright © 2005 William Pitcock, et al. |
2 | * Copyright © 2005 William Pitcock, et al. |
3 | * Rights to this code are as documented in doc/pod/license.pod. |
3 | * Rights to this code are as documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Protocol handlers, both generic and the actual declarations themselves. |
5 | * Protocol handlers, both generic and the actual declarations themselves. |
6 | * |
6 | * |
7 | * $Id: phandler.h,v 1.2 2007/07/21 01:29:07 pippijn Exp $ |
7 | * $Id: phandler.h,v 1.3 2007/07/21 13:23:18 pippijn Exp $ |
8 | */ |
8 | */ |
9 | |
9 | |
10 | #ifndef PHANDLER_H |
10 | #ifndef PHANDLER_H |
11 | #define PHANDLER_H |
11 | #define PHANDLER_H |
12 | |
12 | |
… | |
… | |
33 | char *ban_like_modes; /* e.g. "beI" */ |
33 | char *ban_like_modes; /* e.g. "beI" */ |
34 | char except_mchar; |
34 | char except_mchar; |
35 | char invex_mchar; |
35 | char invex_mchar; |
36 | int flags; |
36 | int flags; |
37 | }; |
37 | }; |
38 | |
|
|
39 | struct ircd_t; |
|
|
40 | |
38 | |
41 | /* values for type */ |
39 | /* values for type */ |
42 | /* -- what the HELL are these used for? A grep reveals nothing.. --w00t |
40 | /* -- what the HELL are these used for? A grep reveals nothing.. --w00t |
43 | * -- they are used to provide a hint to third-party module coders about what |
41 | * -- they are used to provide a hint to third-party module coders about what |
44 | * ircd they are working with. --nenolod |
42 | * ircd they are working with. --nenolod |
… | |
… | |
103 | E void (*chan_lowerts) (channel_t *c, user_t *u); |
101 | E void (*chan_lowerts) (channel_t *c, user_t *u); |
104 | /* kick a user from a channel |
102 | /* kick a user from a channel |
105 | * from is a client on the services server which may or may not be |
103 | * from is a client on the services server which may or may not be |
106 | * on the channel */ |
104 | * on the channel */ |
107 | E void (*kick) (char *from, char *channel, char *to, char *reason); |
105 | E void (*kick) (char *from, char *channel, char *to, char *reason); |
|
|
106 | /* change ircd metadata */ |
|
|
107 | E void (*mdchange) (const char *target, const char *key, const char *value); |
108 | /* send a privmsg |
108 | /* send a privmsg |
109 | * here it's ok to assume the source is able to send */ |
109 | * here it's ok to assume the source is able to send */ |
110 | E void (*msg) (const char *from, const char *target, const char *fmt, ...); |
110 | E void (*msg) (const char *from, const char *target, const char *fmt, ...); |
111 | /* send a notice to a user |
111 | /* send a notice to a user |
112 | * from can be a client on the services server or the services server |
112 | * from can be a client on the services server or the services server |
… | |
… | |
196 | /* find next channel ban (or other ban-like mode) matching user */ |
196 | /* find next channel ban (or other ban-like mode) matching user */ |
197 | E node_t *(*next_matching_ban) (channel_t *c, user_t *u, int type, node_t *first); |
197 | E node_t *(*next_matching_ban) (channel_t *c, user_t *u, int type, node_t *first); |
198 | /* find next host channel access matching user */ |
198 | /* find next host channel access matching user */ |
199 | E node_t *(*next_matching_host_chanacs) (mychan_t *mc, user_t *u, node_t *first); |
199 | E node_t *(*next_matching_host_chanacs) (mychan_t *mc, user_t *u, node_t *first); |
200 | |
200 | |
201 | E unsigned int generic_server_login (void); |
201 | // These two are used in some protocol modules |
202 | E void generic_introduce_nick (user_t *u); |
|
|
203 | E void generic_invite_sts (user_t *source, user_t *target, channel_t *channel); |
|
|
204 | E void generic_quit_sts (user_t *u, const char *reason); |
|
|
205 | E void generic_wallops_sts (const char *text); |
|
|
206 | E void generic_join_sts (channel_t *c, user_t *u, bool isnew, char *modes); |
|
|
207 | E void generic_chan_lowerts (channel_t *c, user_t *u); |
|
|
208 | E void generic_kick (char *from, char *channel, char *to, char *reason); |
|
|
209 | E void generic_msg (const char *from, const char *target, const char *fmt, ...); |
|
|
210 | E void generic_notice_user_sts (user_t *from, user_t *target, const char *text); |
|
|
211 | E void generic_notice_global_sts (user_t *from, const char *mask, const char *text); |
|
|
212 | E void generic_notice_channel_sts (user_t *from, channel_t *target, const char *text); |
|
|
213 | E void generic_wallchops (user_t *source, channel_t *target, const char *message); |
202 | E void generic_wallchops (user_t *source, channel_t *target, const char *message); |
214 | E void generic_numeric_sts (char *from, int numeric, char *target, char *fmt, ...); |
|
|
215 | E void generic_skill (char *from, char *nick, char *fmt, ...); |
|
|
216 | E void generic_part_sts (channel_t *c, user_t *u); |
|
|
217 | E void generic_kline_sts (char *server, char *user, char *host, long duration, char *reason); |
|
|
218 | E void generic_unkline_sts (char *server, char *user, char *host); |
|
|
219 | E void generic_topic_sts (channel_t *c, const char *setter, time_t ts, time_t prevts, const char *topic); |
|
|
220 | E void generic_mode_sts (char *sender, channel_t *target, char *modes); |
|
|
221 | E void generic_ping_sts (void); |
|
|
222 | E void generic_on_login (char *origin, char *user, char *wantedhost); |
|
|
223 | E bool generic_on_logout (char *origin, char *user, char *wantedhost); |
|
|
224 | E void generic_jupe (const char *server, const char *reason); |
|
|
225 | E void generic_sethost_sts (char *source, char *target, char *host); |
|
|
226 | E void generic_fnc_sts (user_t *source, user_t *u, char *newnick, int type); |
203 | E void generic_fnc_sts (user_t *source, user_t *u, char *newnick, int type); |
227 | E void generic_holdnick_sts (user_t *source, int duration, const char *nick, myuser_t *account); |
|
|
228 | E void generic_svslogin_sts (char *target, char *nick, char *user, char *host, char *login); |
|
|
229 | E void generic_sasl_sts (char *target, char mode, char *data); |
|
|
230 | E node_t *generic_next_matching_ban (channel_t *c, user_t *u, int type, node_t *first); |
|
|
231 | E node_t *generic_next_matching_host_chanacs (mychan_t *mc, user_t *u, node_t *first); |
|
|
232 | |
204 | |
233 | E cmode_t *mode_list; |
205 | E cmode_t *mode_list; |
234 | E extmode *ignore_mode_list; |
206 | E extmode *ignore_mode_list; |
235 | E cmode_t *status_mode_list; |
207 | E cmode_t *status_mode_list; |
236 | E cmode_t *prefix_mode_list; |
208 | E cmode_t *prefix_mode_list; |