fixed propagation of user mode changes (user should ALWAYS be notified)
[ircu2.10.12-pk.git] / include / ircd_handler.h
1 /*
2  * IRC - Internet Relay Chat, include/ircd_handler.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 Message handler types and definitions.
22  * @version $Id: ircd_handler.h 1228 2004-10-05 04:11:36Z entrope $
23  */
24 #ifndef INCLUDED_ircd_handler_h
25 #define INCLUDED_ircd_handler_h
26
27 struct Client;
28
29 /*
30  * MessageHandler
31  */
32 /** Enumerated type for client message handlers. */
33 typedef enum HandlerType {
34   UNREGISTERED_HANDLER, /**< Used for unregistered clients. */
35   CLIENT_HANDLER,       /**< Used for local users. */
36   SERVER_HANDLER,       /**< Used for server conections. */
37   OPER_HANDLER,         /**< Used for IRC operators. */
38   SERVICE_HANDLER,      /**< Used for services connections. */
39   LAST_HANDLER_TYPE     /**< NUmber of handler types. */
40 } HandlerType;
41
42 /**
43  * MessageHandler function.
44  * @param[in] cptr Client that sent us the message.
45  * @param[in] sptr Original source of message.
46  * @param[in] parc Number of arguments.
47  * @param[in] parv Argument vector.
48  */
49 typedef int (*MessageHandler)(struct Client* cptr, struct Client* sptr, int parc, char*parv[]);
50
51
52 #endif /* INCLUDED_ircd_handler_h */
53