]> jfr.im git - irc/quakenet/snircd.git/blame - include/handlers.h
forward port of asuka-check.patch to .12
[irc/quakenet/snircd.git] / include / handlers.h
CommitLineData
189935b1 1/*
2 * IRC - Internet Relay Chat, include/handlers.h
3 * Copyright (C) 1990 Jarkko Oikarinen and
4 * University of Oulu, Computing Center
5 *
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)
9 * any later version.
10 *
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.
15 *
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.
19 */
20/** @file
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 $
23 */
24#ifndef INCLUDED_handlers_h
25#define INCLUDED_handlers_h
26
27/** @page m_functions Protocol Message Handlers
28 *
29 * m_functions execute protocol messages on this server:
30 * int m_func(struct Client* cptr, struct Client* sptr, int parc, char* parv[]);
31 *
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...).
37 *
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.
41 *
42 * (!IsServer(cptr)) => (cptr == sptr), because
43 * prefixes are taken *only* from servers...
44 *
45 * (IsServer(cptr))
46 * (sptr == cptr) => the message didn't
47 * have the prefix.
48 *
49 * (sptr != cptr && IsServer(sptr) means
50 * the prefix specified servername. (?)
51 *
52 * (sptr != cptr && !IsServer(sptr) means
53 * that message originated from a remote
54 * user (not local).
55 *
56 *
57 * combining
58 *
59 * (!IsServer(sptr)) means that, sptr can safely
60 * taken as defining the target structure of the
61 * message in this server.
62 *
63 * *Always* true (if 'parse' and others are working correct):
64 *
65 * 1) sptr->from == cptr (note: cptr->from == cptr)
66 *
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 ]
71 *
72 * parc number of variable parameter strings (if zero,
73 * parv is allowed to be NULL)
74 *
75 * parv a NULL terminated list of parameter pointers,
76 *
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*
82 *
83 * note: it is guaranteed that parv[0]..parv[parc-1] are all
84 * non-NULL pointers.
85 */
86
87struct Client;
88
89extern int m_admin(struct Client*, struct Client*, int, char*[]);
90extern int m_away(struct Client*, struct Client*, int, char*[]);
f4a888ca 91
92/*
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).
97 *
98 * qoreQ (qoreQ@quakenet.org) - 08/30/2002
99 * -----------------------------------------------------------------------------
100 */
101
102extern int m_check(struct Client *cptr, struct Client *sptr, int parc, char *parv[]);
103
189935b1 104extern int m_cap(struct Client*, struct Client*, int, char*[]);
105extern int m_cnotice(struct Client*, struct Client*, int, char*[]);
106extern int m_cprivmsg(struct Client*, struct Client*, int, char*[]);
107extern int m_gline(struct Client*, struct Client*, int, char*[]);
108extern int m_help(struct Client*, struct Client*, int, char*[]);
109extern int m_ignore(struct Client*, struct Client*, int, char*[]);
110extern int m_info(struct Client*, struct Client*, int, char*[]);
111extern int m_invite(struct Client*, struct Client*, int, char*[]);
112extern int m_ison(struct Client*, struct Client*, int, char*[]);
113extern int m_join(struct Client*, struct Client*, int, char*[]);
114extern int m_jupe(struct Client*, struct Client*, int, char*[]);
115extern int m_kick(struct Client*, struct Client*, int, char*[]);
116extern int m_links(struct Client*, struct Client*, int, char*[]);
117extern int m_links_redirect(struct Client*, struct Client*, int, char*[]);
118extern int m_list(struct Client*, struct Client*, int, char*[]);
119extern int m_lusers(struct Client*, struct Client*, int, char*[]);
120extern int m_map(struct Client*, struct Client*, int, char*[]);
121extern int m_map_redirect(struct Client*, struct Client*, int, char*[]);
122extern int m_mode(struct Client*, struct Client*, int, char*[]);
123extern int m_motd(struct Client*, struct Client*, int, char*[]);
124extern int m_names(struct Client*, struct Client*, int, char*[]);
125extern int m_nick(struct Client*, struct Client*, int, char*[]);
126extern int m_not_oper(struct Client*, struct Client*, int, char*[]);
127extern int m_notice(struct Client*, struct Client*, int, char*[]);
128extern int m_notice(struct Client*, struct Client*, int, char*[]);
129extern int m_oper(struct Client*, struct Client*, int, char*[]);
130extern int m_part(struct Client*, struct Client*, int, char*[]);
131extern int mr_pass(struct Client*, struct Client*, int, char*[]);
132extern int m_ping(struct Client*, struct Client*, int, char*[]);
133extern int m_pong(struct Client*, struct Client*, int, char*[]);
134extern int m_private(struct Client*, struct Client*, int, char*[]);
135extern int m_privmsg(struct Client*, struct Client*, int, char*[]);
136extern int m_proto(struct Client*, struct Client*, int, char*[]);
137extern int m_pseudo(struct Client*, struct Client*, int, char*[]);
138extern int m_quit(struct Client*, struct Client*, int, char*[]);
139extern int m_registered(struct Client*, struct Client*, int, char*[]);
1d4df40c 140extern int m_sethost(struct Client*, struct Client*, int, char*[]);
189935b1 141extern int m_silence(struct Client*, struct Client*, int, char*[]);
142extern int m_stats(struct Client*, struct Client*, int, char*[]);
143extern int m_time(struct Client*, struct Client*, int, char*[]);
144extern int m_topic(struct Client*, struct Client*, int, char*[]);
145extern int m_trace(struct Client*, struct Client*, int, char*[]);
146extern int m_unregistered(struct Client*, struct Client*, int, char*[]);
147extern int m_unsupported(struct Client*, struct Client*, int, char*[]);
148extern int m_user(struct Client*, struct Client*, int, char*[]);
149extern int m_userhost(struct Client*, struct Client*, int, char*[]);
150extern int m_userip(struct Client*, struct Client*, int, char*[]);
151extern int m_version(struct Client*, struct Client*, int, char*[]);
152extern int m_wallchops(struct Client*, struct Client*, int, char*[]);
153extern int m_wallvoices(struct Client*, struct Client*, int, char*[]);
154extern int m_who(struct Client*, struct Client*, int, char*[]);
155extern int m_whois(struct Client*, struct Client*, int, char*[]);
156extern int m_whowas(struct Client*, struct Client*, int, char*[]);
157extern int mo_admin(struct Client*, struct Client*, int, char*[]);
158extern int mo_asll(struct Client*, struct Client*, int, char*[]);
159extern int mo_clearmode(struct Client*, struct Client*, int, char*[]);
160extern int mo_close(struct Client*, struct Client*, int, char*[]);
161extern int mo_connect(struct Client*, struct Client*, int, char*[]);
162extern int mo_die(struct Client*, struct Client*, int, char*[]);
163extern int mo_get(struct Client*, struct Client*, int, char*[]);
164extern int mo_gline(struct Client*, struct Client*, int, char*[]);
165extern int mo_info(struct Client*, struct Client*, int, char*[]);
166extern int mo_jupe(struct Client*, struct Client*, int, char*[]);
167extern int mo_kill(struct Client*, struct Client*, int, char*[]);
168extern int mo_notice(struct Client*, struct Client*, int, char*[]);
169extern int mo_oper(struct Client*, struct Client*, int, char*[]);
170extern int mo_opmode(struct Client*, struct Client*, int, char*[]);
171extern int mo_ping(struct Client*, struct Client*, int, char*[]);
172extern int mo_privmsg(struct Client*, struct Client*, int, char*[]);
173extern int mo_privs(struct Client*, struct Client*, int, char*[]);
174extern int mo_rehash(struct Client*, struct Client*, int, char*[]);
175extern int mo_reset(struct Client*, struct Client*, int, char*[]);
176extern int mo_restart(struct Client*, struct Client*, int, char*[]);
177extern int mo_rping(struct Client*, struct Client*, int, char*[]);
178extern int mo_set(struct Client*, struct Client*, int, char*[]);
179extern int mo_settime(struct Client*, struct Client*, int, char*[]);
180extern int mo_squit(struct Client*, struct Client*, int, char*[]);
181extern int mo_stats(struct Client*, struct Client*, int, char*[]);
182extern int mo_trace(struct Client*, struct Client*, int, char*[]);
183extern int mo_uping(struct Client*, struct Client*, int, char*[]);
184extern int mo_version(struct Client*, struct Client*, int, char*[]);
185extern int mo_wallops(struct Client*, struct Client*, int, char*[]);
186extern int mo_wallusers(struct Client*, struct Client*, int, char*[]);
187extern int mr_error(struct Client*, struct Client*, int, char*[]);
188extern int mr_error(struct Client*, struct Client*, int, char*[]);
189extern int mr_pong(struct Client*, struct Client*, int, char*[]);
190extern int mr_server(struct Client*, struct Client*, int, char*[]);
191extern int ms_account(struct Client*, struct Client*, int, char*[]);
192extern int ms_admin(struct Client*, struct Client*, int, char*[]);
193extern int ms_asll(struct Client*, struct Client*, int, char*[]);
194extern int ms_away(struct Client*, struct Client*, int, char*[]);
195extern int ms_burst(struct Client*, struct Client*, int, char*[]);
196extern int ms_clearmode(struct Client*, struct Client*, int, char*[]);
197extern int ms_connect(struct Client*, struct Client*, int, char*[]);
198extern int ms_create(struct Client*, struct Client*, int, char*[]);
199extern int ms_destruct(struct Client*, struct Client*, int, char*[]);
200extern int ms_desynch(struct Client*, struct Client*, int, char*[]);
201extern int ms_end_of_burst(struct Client*, struct Client*, int, char*[]);
202extern int ms_end_of_burst_ack(struct Client*, struct Client*, int, char*[]);
203extern int ms_error(struct Client*, struct Client*, int, char*[]);
204extern int ms_gline(struct Client*, struct Client*, int, char*[]);
205extern int ms_info(struct Client*, struct Client*, int, char*[]);
206extern int ms_invite(struct Client*, struct Client*, int, char*[]);
207extern int ms_join(struct Client*, struct Client*, int, char*[]);
208extern int ms_jupe(struct Client*, struct Client*, int, char*[]);
209extern int ms_kick(struct Client*, struct Client*, int, char*[]);
210extern int ms_kill(struct Client*, struct Client*, int, char*[]);
211extern int ms_links(struct Client*, struct Client*, int, char*[]);
212extern int ms_lusers(struct Client*, struct Client*, int, char*[]);
213extern int ms_mode(struct Client*, struct Client*, int, char*[]);
214extern int ms_motd(struct Client*, struct Client*, int, char*[]);
215extern int ms_names(struct Client*, struct Client*, int, char*[]);
216extern int ms_nick(struct Client*, struct Client*, int, char*[]);
217extern int ms_notice(struct Client*, struct Client*, int, char*[]);
218extern int ms_oper(struct Client*, struct Client*, int, char*[]);
219extern int ms_opmode(struct Client*, struct Client*, int, char*[]);
220extern int ms_part(struct Client*, struct Client*, int, char*[]);
221extern int ms_ping(struct Client*, struct Client*, int, char*[]);
222extern int ms_pong(struct Client*, struct Client*, int, char*[]);
223extern int ms_privmsg(struct Client*, struct Client*, int, char*[]);
224extern int ms_privs(struct Client*, struct Client*, int, char*[]);
225extern int ms_quit(struct Client*, struct Client*, int, char*[]);
226extern int ms_rping(struct Client*, struct Client*, int, char*[]);
227extern int ms_rpong(struct Client*, struct Client*, int, char*[]);
228extern int ms_server(struct Client*, struct Client*, int, char*[]);
229extern int ms_settime(struct Client*, struct Client*, int, char*[]);
230extern int ms_silence(struct Client*, struct Client*, int, char*[]);
231extern int ms_squit(struct Client*, struct Client*, int, char*[]);
232extern int ms_stats(struct Client*, struct Client*, int, char*[]);
233extern int ms_topic(struct Client*, struct Client*, int, char*[]);
234extern int ms_trace(struct Client*, struct Client*, int, char*[]);
235extern int ms_uping(struct Client*, struct Client*, int, char*[]);
236extern int ms_version(struct Client*, struct Client*, int, char*[]);
237extern int ms_wallchops(struct Client*, struct Client*, int, char*[]);
238extern int ms_wallops(struct Client*, struct Client*, int, char*[]);
239extern int ms_wallusers(struct Client*, struct Client*, int, char*[]);
240extern int ms_wallvoices(struct Client*, struct Client*, int, char*[]);
241extern int ms_whois(struct Client*, struct Client*, int, char*[]);
242
243#endif /* INCLUDED_handlers_h */
244