Merge remote-tracking branch 'IOMultiplexer/v2'
[NextIRCd.git] / src / struct_client.h
1 /* struct_client.h - NextIRCd
2  * Copyright (C) 2012-2013  Philipp Kreil (pk910)
3  * 
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License 
15  * along with this program. If not, see <http://www.gnu.org/licenses/>. 
16  */
17
18 #ifndef _struct_client_h
19 #define _struct_client_h
20 #include "crypt_md5.h"
21 #include "struct_user.h"
22
23 struct Connection;
24 struct User;
25
26 struct ClientNickChange;
27
28 #define AWAYLEN  300
29
30 /* Client represents a local User */
31 struct Client {
32     struct Connection *conn;
33         struct User *user;
34         
35         struct ClientNickChange *nickchange;
36         
37         time_t userage;
38         time_t nickage;
39         time_t lastping;
40         time_t idlelen;
41     
42         char *userage_sign;
43         char *nickage_sign;
44         
45         char awaymsg[AWAYLEN-1];
46         
47         unsigned int isonline : 1;
48         unsigned int isaway : 1;
49         
50         struct Client *prev, *next;
51 };
52
53 struct ClientNickChange {
54         char newnick[NICKLEN+1];
55         char nickhash[MDHASHLEN];
56 };
57
58 #endif