]> jfr.im git - irc/rqf/shadowircd.git/blob - include/s_gline.h
[svn] - the new plan:
[irc/rqf/shadowircd.git] / include / s_gline.h
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-2004 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 *
24 * $Id: s_gline.h 6 2005-09-10 01:02:21Z nenolod $
25 */
26
27 #ifndef INCLUDED_s_gline_h
28 #define INCLUDED_s_gline_h
29
30 #include "config.h"
31 #include "ircd_defs.h"
32
33 struct Client;
34 struct ConfItem;
35
36 extern struct ConfItem *find_is_glined(const char *host, const char *name);
37 extern void cleanup_glines(void *unused);
38 extern void add_gline(struct ConfItem *);
39
40
41 typedef struct gline_pending
42 {
43 char oper_nick1[NICKLEN + 1];
44 char oper_user1[USERLEN + 1];
45 char oper_host1[HOSTLEN + 1];
46 const char *oper_server1; /* point to scache */
47 char *reason1;
48 time_t time_request1;
49
50 char oper_nick2[NICKLEN + 1];
51 char oper_user2[USERLEN + 1];
52 char oper_host2[HOSTLEN + 1];
53 const char *oper_server2; /* point to scache */
54 char *reason2;
55 time_t time_request2;
56
57 time_t last_gline_time; /* for expiring entry */
58 char user[USERLEN + 1];
59 char host[HOSTLEN + 1];
60 }
61 gline_pending_t;
62
63 /* how long a pending G line can be around
64 * 10 minutes should be plenty
65 */
66
67 #define GLINE_PENDING_EXPIRE 600
68 #define CLEANUP_GLINES_TIME 300
69
70 dlink_list pending_glines;
71 extern dlink_list glines;
72
73 #endif