]>
jfr.im git - irc/evilnet/x3.git/blob - src/shun.h
1 /* shun.h - Shun database
2 * Copyright 2001-2004 srvx Development Team
4 * This file is part of x3.
6 * x3 is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with srvx; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
36 enum { SSUBSET
, SEXACT
, SSUPERSET
} target_mask_type
;
39 char *alt_target_mask
;
46 struct shun
*shun_add(const char *issuer
, const char *target
, unsigned long duration
, const char *reason
, time_t issued
, int announce
);
47 struct shun
*shun_find(const char *target
);
48 int shun_remove(const char *target
, int announce
);
49 void shun_refresh_server(struct server
*srv
);
50 void shun_refresh_all(void);
51 unsigned int shun_count(void);
53 typedef void (*shun_search_func
)(struct shun
*shun
, void *extra
);
54 struct shun_discrim
*shun_discrim_create(struct userNode
*user
, struct userNode
*src
, unsigned int argc
, char *argv
[]);
55 unsigned int shun_discrim_search(struct shun_discrim
*discrim
, shun_search_func gsf
, void *data
);
57 #endif /* !defined(SHUN_H) */