1 #ifndef INCLUDED_jupe_h
2 #define INCLUDED_jupe_h
4 * IRC - Internet Relay Chat, include/jupe.h
5 * Copyright (C) 1990 Jarkko Oikarinen and
6 * University of Oulu, Computing Center
7 * Copyright (C) 2000 Kevin L. Mitchell <klmitch@mit.edu>
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, or (at your option)
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.
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., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef INCLUDED_config_h
28 #ifndef INCLUDED_sys_types_h
29 #include <sys/types.h>
30 #define INCLUDED_sys_types_h
36 #define JUPE_MAX_EXPIRE 604800 /* max expire: 7 days */
40 struct Jupe** ju_prev_p;
45 unsigned int ju_flags;
51 #define JupeIsActive(j) ((j)->ju_flags & JUPE_ACTIVE)
52 #define JupeIsLocal(j) ((j)->ju_flags & JUPE_LOCAL)
54 #define JupeServer(j) ((j)->ju_server)
55 #define JupeReason(j) ((j)->ju_reason)
56 #define JupeLastMod(j) ((j)->ju_lastmod)
58 extern int jupe_add(struct Client *cptr, struct Client *sptr, char *server,
59 char *reason, time_t expire, time_t lastmod, int local,
61 extern int jupe_activate(struct Client *cptr, struct Client *sptr,
62 struct Jupe *jupe, time_t lastmod);
63 extern int jupe_deactivate(struct Client *cptr, struct Client *sptr,
64 struct Jupe *jupe, time_t lastmod);
65 extern struct Jupe* jupe_find(char *server);
66 extern void jupe_free(struct Jupe *jupe);
67 extern void jupe_burst(struct Client *cptr);
68 extern int jupe_resend(struct Client *cptr, struct Jupe *jupe);
69 extern int jupe_list(struct Client *sptr, char *server);
71 #endif /* INCLUDED_jupe_h */