]>
jfr.im git - irc/quakenet/snircd.git/blob - include/handlers.h
2 * IRC - Internet Relay Chat, include/handlers.h
3 * Copyright (C) 1990 Jarkko Oikarinen and
4 * University of Oulu, Computing Center
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * @brief Declarations for all protocol message handler functions.
22 * @version $Id: handlers.h,v 1.22 2005/04/02 02:50:12 entrope Exp $
24 #ifndef INCLUDED_handlers_h
25 #define INCLUDED_handlers_h
27 /** @page m_functions Protocol Message Handlers
29 * m_functions execute protocol messages on this server:
30 * int m_func(struct Client* cptr, struct Client* sptr, int parc, char* parv[]);
32 * cptr is always NON-NULL, pointing to a *LOCAL* client
33 * structure (with an open socket connected!). This
34 * identifies the physical socket where the message
35 * originated (or which caused the m_function to be
36 * executed--some m_functions may call others...).
38 * sptr is the source of the message, defined by the
39 * prefix part of the message if present. If not
40 * or prefix not found, then sptr==cptr.
42 * (!IsServer(cptr)) => (cptr == sptr), because
43 * prefixes are taken *only* from servers...
46 * (sptr == cptr) => the message didn't
49 * (sptr != cptr && IsServer(sptr) means
50 * the prefix specified servername. (?)
52 * (sptr != cptr && !IsServer(sptr) means
53 * that message originated from a remote
59 * (!IsServer(sptr)) means that, sptr can safely
60 * taken as defining the target structure of the
61 * message in this server.
63 * *Always* true (if 'parse' and others are working correct):
65 * 1) sptr->from == cptr (note: cptr->from == cptr)
67 * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
68 * *cannot* be a local connection, unless it's
69 * actually cptr!). [MyConnect(x) should probably
70 * be defined as (x == x->from) --msa ]
72 * parc number of variable parameter strings (if zero,
73 * parv is allowed to be NULL)
75 * parv a NULL terminated list of parameter pointers,
77 * parv[0], sender (prefix string), if not present
78 * this points to an empty string.
79 * parv[1]...parv[parc-1]
80 * pointers to additional parameters
81 * parv[parc] == NULL, *always*
83 * note: it is guaranteed that parv[0]..parv[parc-1] are all
89 extern int m_admin(struct Client
*, struct Client
*, int, char*[]);
90 extern int m_away(struct Client
*, struct Client
*, int, char*[]);
93 * - ASUKA ---------------------------------------------------------------------
94 * Add the command for CHECK.
95 * This was adapted from Lain for use in Asuka.
96 * Original code by Durzel (durzel@quakenet.org).
98 * qoreQ (qoreQ@quakenet.org) - 08/30/2002
99 * -----------------------------------------------------------------------------
102 extern int m_check(struct Client
*cptr
, struct Client
*sptr
, int parc
, char *parv
[]);
104 extern int m_cap(struct Client
*, struct Client
*, int, char*[]);
105 extern int m_cnotice(struct Client
*, struct Client
*, int, char*[]);
106 extern int m_cprivmsg(struct Client
*, struct Client
*, int, char*[]);
107 extern int m_gline(struct Client
*, struct Client
*, int, char*[]);
108 extern int m_help(struct Client
*, struct Client
*, int, char*[]);
109 extern int m_ignore(struct Client
*, struct Client
*, int, char*[]);
110 extern int m_info(struct Client
*, struct Client
*, int, char*[]);
111 extern int m_invite(struct Client
*, struct Client
*, int, char*[]);
112 extern int m_ison(struct Client
*, struct Client
*, int, char*[]);
113 extern int m_join(struct Client
*, struct Client
*, int, char*[]);
114 extern int m_jupe(struct Client
*, struct Client
*, int, char*[]);
115 extern int m_kick(struct Client
*, struct Client
*, int, char*[]);
116 extern int m_links(struct Client
*, struct Client
*, int, char*[]);
117 extern int m_links_redirect(struct Client
*, struct Client
*, int, char*[]);
118 extern int m_list(struct Client
*, struct Client
*, int, char*[]);
119 extern int m_lusers(struct Client
*, struct Client
*, int, char*[]);
120 extern int m_map(struct Client
*, struct Client
*, int, char*[]);
121 extern int m_map_redirect(struct Client
*, struct Client
*, int, char*[]);
122 extern int m_mode(struct Client
*, struct Client
*, int, char*[]);
123 extern int m_motd(struct Client
*, struct Client
*, int, char*[]);
124 extern int m_names(struct Client
*, struct Client
*, int, char*[]);
125 extern int m_nick(struct Client
*, struct Client
*, int, char*[]);
126 extern int m_not_oper(struct Client
*, struct Client
*, int, char*[]);
127 extern int m_notice(struct Client
*, struct Client
*, int, char*[]);
128 extern int m_notice(struct Client
*, struct Client
*, int, char*[]);
129 extern int m_oper(struct Client
*, struct Client
*, int, char*[]);
130 extern int m_part(struct Client
*, struct Client
*, int, char*[]);
131 extern int mr_pass(struct Client
*, struct Client
*, int, char*[]);
132 extern int m_ping(struct Client
*, struct Client
*, int, char*[]);
133 extern int m_pong(struct Client
*, struct Client
*, int, char*[]);
134 extern int m_private(struct Client
*, struct Client
*, int, char*[]);
135 extern int m_privmsg(struct Client
*, struct Client
*, int, char*[]);
136 extern int m_proto(struct Client
*, struct Client
*, int, char*[]);
137 extern int m_pseudo(struct Client
*, struct Client
*, int, char*[]);
138 extern int m_quit(struct Client
*, struct Client
*, int, char*[]);
139 extern int m_registered(struct Client
*, struct Client
*, int, char*[]);
140 extern int m_sethost(struct Client
*, struct Client
*, int, char*[]);
141 extern int m_silence(struct Client
*, struct Client
*, int, char*[]);
142 extern int m_stats(struct Client
*, struct Client
*, int, char*[]);
143 extern int m_time(struct Client
*, struct Client
*, int, char*[]);
144 extern int m_topic(struct Client
*, struct Client
*, int, char*[]);
145 extern int m_trace(struct Client
*, struct Client
*, int, char*[]);
146 extern int m_unregistered(struct Client
*, struct Client
*, int, char*[]);
147 extern int m_unsupported(struct Client
*, struct Client
*, int, char*[]);
148 extern int m_user(struct Client
*, struct Client
*, int, char*[]);
149 extern int m_userhost(struct Client
*, struct Client
*, int, char*[]);
150 extern int m_userip(struct Client
*, struct Client
*, int, char*[]);
151 extern int m_version(struct Client
*, struct Client
*, int, char*[]);
152 extern int m_wallchops(struct Client
*, struct Client
*, int, char*[]);
153 extern int m_wallvoices(struct Client
*, struct Client
*, int, char*[]);
154 extern int m_who(struct Client
*, struct Client
*, int, char*[]);
155 extern int m_whois(struct Client
*, struct Client
*, int, char*[]);
156 extern int m_whowas(struct Client
*, struct Client
*, int, char*[]);
157 extern int mo_admin(struct Client
*, struct Client
*, int, char*[]);
158 extern int mo_asll(struct Client
*, struct Client
*, int, char*[]);
159 extern int mo_clearmode(struct Client
*, struct Client
*, int, char*[]);
160 extern int mo_close(struct Client
*, struct Client
*, int, char*[]);
161 extern int mo_connect(struct Client
*, struct Client
*, int, char*[]);
162 extern int mo_die(struct Client
*, struct Client
*, int, char*[]);
163 extern int mo_get(struct Client
*, struct Client
*, int, char*[]);
164 extern int mo_gline(struct Client
*, struct Client
*, int, char*[]);
165 extern int mo_info(struct Client
*, struct Client
*, int, char*[]);
166 extern int mo_jupe(struct Client
*, struct Client
*, int, char*[]);
167 extern int mo_kill(struct Client
*, struct Client
*, int, char*[]);
168 extern int mo_notice(struct Client
*, struct Client
*, int, char*[]);
169 extern int mo_oper(struct Client
*, struct Client
*, int, char*[]);
170 extern int mo_opmode(struct Client
*, struct Client
*, int, char*[]);
171 extern int mo_ping(struct Client
*, struct Client
*, int, char*[]);
172 extern int mo_privmsg(struct Client
*, struct Client
*, int, char*[]);
173 extern int mo_privs(struct Client
*, struct Client
*, int, char*[]);
174 extern int mo_rehash(struct Client
*, struct Client
*, int, char*[]);
175 extern int mo_reset(struct Client
*, struct Client
*, int, char*[]);
176 extern int mo_restart(struct Client
*, struct Client
*, int, char*[]);
177 extern int mo_rping(struct Client
*, struct Client
*, int, char*[]);
178 extern int mo_set(struct Client
*, struct Client
*, int, char*[]);
179 extern int mo_settime(struct Client
*, struct Client
*, int, char*[]);
180 extern int mo_squit(struct Client
*, struct Client
*, int, char*[]);
181 extern int mo_stats(struct Client
*, struct Client
*, int, char*[]);
182 extern int mo_trace(struct Client
*, struct Client
*, int, char*[]);
183 extern int mo_uping(struct Client
*, struct Client
*, int, char*[]);
184 extern int mo_version(struct Client
*, struct Client
*, int, char*[]);
185 extern int mo_wallops(struct Client
*, struct Client
*, int, char*[]);
186 extern int mo_wallusers(struct Client
*, struct Client
*, int, char*[]);
187 extern int mr_error(struct Client
*, struct Client
*, int, char*[]);
188 extern int mr_error(struct Client
*, struct Client
*, int, char*[]);
189 extern int mr_pong(struct Client
*, struct Client
*, int, char*[]);
190 extern int mr_server(struct Client
*, struct Client
*, int, char*[]);
191 extern int ms_account(struct Client
*, struct Client
*, int, char*[]);
192 extern int ms_admin(struct Client
*, struct Client
*, int, char*[]);
193 extern int ms_asll(struct Client
*, struct Client
*, int, char*[]);
194 extern int ms_away(struct Client
*, struct Client
*, int, char*[]);
195 extern int ms_burst(struct Client
*, struct Client
*, int, char*[]);
196 extern int ms_clearmode(struct Client
*, struct Client
*, int, char*[]);
197 extern int ms_connect(struct Client
*, struct Client
*, int, char*[]);
198 extern int ms_create(struct Client
*, struct Client
*, int, char*[]);
199 extern int ms_destruct(struct Client
*, struct Client
*, int, char*[]);
200 extern int ms_desynch(struct Client
*, struct Client
*, int, char*[]);
201 extern int ms_end_of_burst(struct Client
*, struct Client
*, int, char*[]);
202 extern int ms_end_of_burst_ack(struct Client
*, struct Client
*, int, char*[]);
203 extern int ms_error(struct Client
*, struct Client
*, int, char*[]);
204 extern int ms_gline(struct Client
*, struct Client
*, int, char*[]);
205 extern int ms_info(struct Client
*, struct Client
*, int, char*[]);
206 extern int ms_invite(struct Client
*, struct Client
*, int, char*[]);
207 extern int ms_join(struct Client
*, struct Client
*, int, char*[]);
208 extern int ms_jupe(struct Client
*, struct Client
*, int, char*[]);
209 extern int ms_kick(struct Client
*, struct Client
*, int, char*[]);
210 extern int ms_kill(struct Client
*, struct Client
*, int, char*[]);
211 extern int ms_links(struct Client
*, struct Client
*, int, char*[]);
212 extern int ms_lusers(struct Client
*, struct Client
*, int, char*[]);
213 extern int ms_mode(struct Client
*, struct Client
*, int, char*[]);
214 extern int ms_motd(struct Client
*, struct Client
*, int, char*[]);
215 extern int ms_names(struct Client
*, struct Client
*, int, char*[]);
216 extern int ms_nick(struct Client
*, struct Client
*, int, char*[]);
217 extern int ms_notice(struct Client
*, struct Client
*, int, char*[]);
218 extern int ms_oper(struct Client
*, struct Client
*, int, char*[]);
219 extern int ms_opmode(struct Client
*, struct Client
*, int, char*[]);
220 extern int ms_part(struct Client
*, struct Client
*, int, char*[]);
221 extern int ms_ping(struct Client
*, struct Client
*, int, char*[]);
222 extern int ms_pong(struct Client
*, struct Client
*, int, char*[]);
223 extern int ms_privmsg(struct Client
*, struct Client
*, int, char*[]);
224 extern int ms_privs(struct Client
*, struct Client
*, int, char*[]);
225 extern int ms_quit(struct Client
*, struct Client
*, int, char*[]);
226 extern int ms_rping(struct Client
*, struct Client
*, int, char*[]);
227 extern int ms_rpong(struct Client
*, struct Client
*, int, char*[]);
228 extern int ms_server(struct Client
*, struct Client
*, int, char*[]);
229 extern int ms_sethost(struct Client
*, struct Client
*, int, char*[]);
230 extern int ms_settime(struct Client
*, struct Client
*, int, char*[]);
231 extern int ms_silence(struct Client
*, struct Client
*, int, char*[]);
232 extern int ms_squit(struct Client
*, struct Client
*, int, char*[]);
233 extern int ms_stats(struct Client
*, struct Client
*, int, char*[]);
234 extern int ms_topic(struct Client
*, struct Client
*, int, char*[]);
235 extern int ms_trace(struct Client
*, struct Client
*, int, char*[]);
236 extern int ms_uping(struct Client
*, struct Client
*, int, char*[]);
237 extern int ms_version(struct Client
*, struct Client
*, int, char*[]);
238 extern int ms_wallchops(struct Client
*, struct Client
*, int, char*[]);
239 extern int ms_wallops(struct Client
*, struct Client
*, int, char*[]);
240 extern int ms_wallusers(struct Client
*, struct Client
*, int, char*[]);
241 extern int ms_wallvoices(struct Client
*, struct Client
*, int, char*[]);
242 extern int ms_whois(struct Client
*, struct Client
*, int, char*[]);
244 #endif /* INCLUDED_handlers_h */