1 /* $Id: client.h 409 2007-03-31 10:58:29Z tsaviran $
2  * -------------------------------------------------------
3  * Copyright (C) 2003-2005 Tommi Saviranta <wnd@iki.fi>
4  * -------------------------------------------------------
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (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 
16 #ifndef CLIENT_H_
17 #define CLIENT_H_
18 
19 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif /* ifdef HAVE_CONFIG_H */
22 
23 #include "channels.h"
24 #include "llist.h"
25 
26 
27 
28 typedef struct {
29 	int	connected;
30 	char	*nickname;
31 	char	*username;
32 	char	*hostname;
33 } client_info;
34 
35 
36 typedef struct {
37 	int		connected;
38 	llist_list	*clients;
39 } clientlist_type;
40 
41 
42 
43 #if 0
44 #include "conntype.h"
45 #include "messages.h"
46 #ifdef QUICKLOG
47 #include "qlog.h"
48 #endif /* QUICKLOG */
49 #include "tools.h"
50 #endif
51 
52 
53 enum {
54 	DISCONNECT_ERROR = 1,
55 	DISCONNECT_REPORT = 2,
56 	DISCONNECT_DYING = 9
57 };
58 void client_drop(connection_type *client, char *reason, const int error,
59 		const int echo, const char *);
60 int client_read(connection_type *client);
61 void client_free(void);
62 
63 
64 
65 /* export global stuff */
66 extern client_info	i_client;
67 extern clientlist_type	c_clients;
68 
69 
70 
71 #endif /* ifndef CLIENT_H_ */
72