1 /* opserv.h - IRC Operator assistant service
2 * Copyright 2000-2004 srvx Development Team
4 * This file is part of srvx.
6 * srvx 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.
24 /* DEVNULL_PRIV_* go into devnull_class.modes */
25 #define DEVNULL_PRIV_CHANLIMIT 0x0001
26 #define DEVNULL_PRIV_UNLIMITTARGET 0x0002
27 #define DEVNULL_PRIV_HALFFLOOD 0x0004
28 #define DEVNULL_PRIV_NOFLOOD 0x0008
29 #define DEVNULL_PRIV_CHANHIDE 0x0010
30 #define DEVNULL_PRIV_IDLEHIDE 0x0020
31 #define DEVNULL_PRIV_CHSERVMODE 0x0040
32 #define DEVNULL_PRIV_XTRAOPMODE 0x0080
33 #define DEVNULL_PRIV_NETSERVMODE 0x0100
34 #define DEVNULL_PRIV_SEEIDLE 0x0200
35 #define DEVNULL_PRIV_FORCEIDLEHIDE 0x0400
36 #define DEVNULL_PRIV_OVERRIDECC 0x0800
37 #define DEVNULL_PRIV_OVERRIDENOAMSG 0x1000
38 #define DEVNULL_PRIV_MAXSENDQ 0x2000
39 #define DEVNULL_PRIV_OPME 0x4000
41 #define DEVNULL_MODES "abcdefghijklmno"
43 #define DEVNULL_HAS_PRIV(cl, tok) ((cl)->modes & DEVNULL_##tok)
44 #define DEVNULL_SET_PRIV(cl, tok) ((cl)->modes |= DEVNULL_##tok)
45 #define DEVNULL_CLEAR_PRIV(cl, tok) ((cl)->modes &= ~DEVNULL_##tok)
47 struct devnull_class {
50 unsigned long maxchan;
51 unsigned long maxsendq;
54 extern void *devnull_check_priv_func;
56 void init_opserv(const char *nick);
57 unsigned int gag_create(const char *mask, const char *owner, const char *reason, unsigned long expires);
58 int opserv_bad_channel(const char *name);
59 int devnull_check_name(const char *name);
60 int devnull_user_has_priv(struct handle_info *hi, int devnull_priv);
61 struct devnull_class devnull_user_get_class(struct handle_info *hi);
62 struct userNode* GetOpServ(void);
63 void operpart(struct chanNode *chan, struct userNode *user);
64 void operadd(struct userNode *user);
65 void operdel(struct userNode *user);