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_sys_types_h
26 #include <sys/types.h>
27 #define INCLUDED_sys_types_h
33 #define JUPE_MAX_EXPIRE 604800 /* max expire: 7 days */
37 struct Jupe** ju_prev_p;
42 unsigned int ju_flags;
45 #define JUPE_ACTIVE 0x0001
46 #define JUPE_LOCAL 0x0002
47 #define JUPE_LDEACT 0x0004 /* locally deactivated */
49 #define JUPE_MASK (JUPE_ACTIVE | JUPE_LOCAL)
50 #define JUPE_ACTMASK (JUPE_ACTIVE | JUPE_LDEACT)
52 #define JupeIsActive(j) (((j)->ju_flags & JUPE_ACTMASK) == JUPE_ACTIVE)
53 #define JupeIsRemActive(j) ((j)->ju_flags & JUPE_ACTIVE)
54 #define JupeIsLocal(j) ((j)->ju_flags & JUPE_LOCAL)
56 #define JupeServer(j) ((j)->ju_server)
57 #define JupeReason(j) ((j)->ju_reason)
58 #define JupeLastMod(j) ((j)->ju_lastmod)
60 extern int jupe_add(struct Client *cptr, struct Client *sptr, char *server,
61 char *reason, time_t expire, time_t lastmod,
63 extern int jupe_activate(struct Client *cptr, struct Client *sptr,
64 struct Jupe *jupe, time_t lastmod,
66 extern int jupe_deactivate(struct Client *cptr, struct Client *sptr,
67 struct Jupe *jupe, time_t lastmod,
69 extern struct Jupe* jupe_find(char *server);
70 extern void jupe_free(struct Jupe *jupe);
71 extern void jupe_burst(struct Client *cptr);
72 extern int jupe_resend(struct Client *cptr, struct Jupe *jupe);
73 extern int jupe_list(struct Client *sptr, char *server);
75 #endif /* INCLUDED_jupe_h */