1 /*
2  *  ircd-ratbox: A slightly useful ircd.
3  *  s_gline.h: A header for the gline functions.
4  *
5  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6  *  Copyright (C) 1996-2002 Hybrid Development Team
7  *  Copyright (C) 2002-2005 ircd-ratbox development team
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
22  *  USA
23  *
24  *  $Id: s_gline.h 24250 2007-08-22 19:15:08Z androsyn $
25  */
26 
27 #ifndef INCLUDED_s_gline_h
28 #define INCLUDED_s_gline_h
29 
30 struct Client;
31 struct ConfItem;
32 
33 void cleanup_glines(void *unused);
34 
35 typedef struct gline_pending
36 {
37 	char oper_nick1[NICKLEN + 1];
38 	char oper_user1[USERLEN + 1];
39 	char oper_host1[HOSTLEN + 1];
40 	const char *oper_server1;	/* point to scache */
41 	char *reason1;
42 	time_t time_request1;
43 
44 	char oper_nick2[NICKLEN + 1];
45 	char oper_user2[USERLEN + 1];
46 	char oper_host2[HOSTLEN + 1];
47 	const char *oper_server2;	/* point to scache */
48 	char *reason2;
49 	time_t time_request2;
50 
51 	time_t last_gline_time;	/* for expiring entry */
52 	char user[USERLEN + 1];
53 	char host[HOSTLEN + 1];
54 }
55 gline_pending_t;
56 
57 /* how long a pending G line can be around
58  * 10 minutes should be plenty
59  */
60 
61 #define GLINE_PENDING_EXPIRE 600
62 #define CLEANUP_GLINES_TIME  300
63 
64 extern rb_dlink_list pending_glines;
65 extern rb_dlink_list glines;
66 
67 #endif
68