Debian Codegraph @

src/bnetd/irc.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2001 Marco Ziech ([email protected])
3 * Copyright (C) 2007 Pelish ([email protected])
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20 /*****/
21 #ifndef JUST_NEED_TYPES
22 #ifndef INCLUDED_IRC_PROTOS
23 #define INCLUDED_IRC_PROTOS
24 #define JUST_NEED_TYPES
25 # include "common/packet.h"
26 # include "connection.h"
27 # include "channel.h"
28 # include "message.h"
29 #undef JUST_NEED_TYPES
30
31 namespace pvpgn
32 {
33
34 namespace bnetd
35 {
36
37 extern int irc_send_cmd(t_connection * conn, char const * command, char const * params);
38 extern int irc_send(t_connection * conn, int code, char const * params);
39 extern int irc_send_ping(t_connection * conn);
40 extern int irc_send_pong(t_connection * conn, char const * params);
41 extern int irc_authenticate(t_connection * conn, char const * passhash);
42 extern char const * irc_convert_channel(t_channel const * channel, t_connection * c);
43 extern char const * irc_convert_ircname(char const * pircname);
44 extern char ** irc_get_listelems(char * list);
45 extern int irc_unget_listelems(char ** elems);
46 extern char ** irc_get_paramelems(char * list);
47 extern char ** irc_get_ladderelems(char * list);
48 extern int irc_unget_ladderelems(char ** elems);
49 extern int irc_unget_paramelems(char ** elems);
50 extern int irc_message_postformat(t_packet * packet, t_connection const * dest);
51 extern int irc_message_format(t_packet * packet, t_message_type type, t_connection * me, t_connection * dst, char const * text, unsigned int dstflags);
52 extern int irc_send_rpl_namreply(t_connection * c, t_channel const * channel);
53 extern int irc_who(t_connection * c, char const * name);
54 extern int irc_send_motd(t_connection * conn);
55 extern int _handle_nick_command(t_connection * conn, int numparams, char ** params, char * text);
56 extern int _handle_ping_command(t_connection * conn, int numparams, char ** params, char * text);
57 extern int _handle_pong_command(t_connection * conn, int numparams, char ** params, char * text);
58 extern int _handle_join_command(t_connection * conn, int numparams, char ** params, char * text);
59 extern int irc_send_topic(t_connection * c, t_channel const * channel);
60 extern int _handle_topic_command(t_connection * conn, int numparams, char ** params, char * text);
61 extern int _handle_kick_command(t_connection * conn, int numparams, char ** params, char * text);
62 extern int _handle_mode_command(t_connection * conn, int numparams, char ** params, char * text);
63 extern int _handle_time_command(t_connection * conn, int numparams, char ** params, char * text);
64 }
65
66 }
67
68 #endif
69 #endif