1 /* dircproxy
2  * Copyright (C) 2000-2003 Scott James Remnant <scott at netsplit dot com>
3  *
4  * Copyright (C) 2004-2008 Francois Harvey <contact at francoisharvey dot ca>
5  *
6  * Copyright (C) 2008-2009 Noel Shrum <noel dot w8tvi at gmail dot com>
7  *                         Francois Harvey <contact at francoisharvey dot ca>
8  *
9  *
10  * irc_client.h
11  * --
12  * @(#) $Id: irc_client.h,v 1.8 2004/02/15 00:56:18 bear Exp $
13  *
14  * This file is distributed according to the GNU General Public
15  * License.  For full details, read the top of 'main.c' or the
16  * file called COPYING that was distributed with this code.
17  */
18 
19 #ifndef __DIRCPROXY_IRC_CLIENT_H
20 #define __DIRCPROXY_IRC_CLIENT_H
21 
22 /* required includes */
23 #include "irc_net.h"
24 #include "help.h"
25 
26 static char * client_commands[] = {
27   "DIE",
28   "DETACH",
29   "HELP",
30   "HOST",
31   "JUMP",
32   "KILL",
33   "RECALL",
34   "RELOAD",
35   "MOTD",
36   "PERSIST",
37   "QUIT",
38   "USERS",
39   "SERVERS",
40   "STATUS",
41   "NOTIFY",
42   "GET",
43   "SET"
44 };
45 
46 #define I_HELP_INDEX     0
47 #define I_HELP_INDEX_END 1
48 #define I_HELP_DIE       2
49 #define I_HELP_DETACH    3
50 #define I_HELP_HOST      4
51 #define I_HELP_JUMP      5
52 #define I_HELP_JUMP_NEW  6
53 #define I_HELP_KILL      7
54 #define I_HELP_HELP      8
55 #define I_HELP_RECALL    9
56 #define I_HELP_RELOAD    10
57 #define I_HELP_MOTD      11
58 #define I_HELP_PERSIST   12
59 #define I_HELP_QUIT      13
60 #define I_HELP_USERS     14
61 #define I_HELP_SERVERS   15
62 #define I_HELP_STATUS    16
63 #define I_HELP_NOTIFY    17
64 #define I_HELP_GET       18
65 #define I_HELP_SET       19
66 
67 static char ** command_help[] = {
68   help_index,
69   help_index_end,
70   help_die,
71   help_detach,
72   help_host,
73   help_jump,
74   help_jump_new,
75   help_kill,
76   help_help,
77   help_recall,
78   help_reload,
79   help_motd,
80   help_persist,
81   help_quit,
82   help_users,
83   help_servers,
84   help_status,
85   help_notify,
86   help_get,
87   help_set
88 };
89 
90 /* functions */
91 extern int ircclient_connected(struct ircproxy *);
92 extern int ircclient_data(struct ircproxy *);
93 extern int ircclient_change_nick(struct ircproxy *, const char *);
94 extern int ircclient_nick_changed(struct ircproxy *, const char *);
95 extern int ircclient_setnickname(struct ircproxy *);
96 extern int ircclient_checknickname(struct ircproxy *);
97 extern int ircclient_generate_nick(struct ircproxy *, const char *);
98 extern int ircclient_change_mode(struct ircproxy *, const char *);
99 extern int ircclient_close(struct ircproxy *);
100 extern int ircclient_welcome(struct ircproxy *);
101 extern int ircclient_send_numeric(struct ircproxy *, short, const char *, ...);
102 extern int ircclient_send_notice(struct ircproxy *, const char *, ...);
103 extern int ircclient_send_channotice(struct ircproxy *, const char *,
104                                      const char *, ...);
105 extern int ircclient_send_command(struct ircproxy *, const char *, const char *,
106                                   ...);
107 extern int ircclient_send_selfcmd(struct ircproxy *, const char *, const char *,
108                                   ...);
109 extern int ircclient_send_error(struct ircproxy *, const char *, ...);
110 
111 #endif /* __DIRCPROXY_IRC_CLIENT_H */
112