X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fopserv.h;h=01209bc9d14099058f8d51bd7e09bdc0e7514835;hb=992bf78ff2a935baa18354a40ab50ef442b4733f;hp=5109d172ba5fd3ba18ab9989b7bf0b3bc4f66367;hpb=222e1b0003536cf7b47858961d4b56d45c6d6606;p=srvx.git diff --git a/src/opserv.h b/src/opserv.h index 5109d17..01209bc 100644 --- a/src/opserv.h +++ b/src/opserv.h @@ -1,11 +1,12 @@ /* opserv.h - IRC Operator assistant service * Copyright 2000-2004 srvx Development Team * - * This program is free software; you can redistribute it and/or modify + * This file is part of srvx. + * + * srvx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. Important limitations are - * listed in the COPYING file that accompanies this software. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,14 +14,56 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, email srvx-maintainers@srvx.net. + * along with srvx; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _opserv_h #define _opserv_h +/* DEVNULL_PRIV_* go into devnull_class.modes */ +#define DEVNULL_PRIV_CHANLIMIT 0x0001 +#define DEVNULL_PRIV_UNLIMITTARGET 0x0002 +#define DEVNULL_PRIV_HALFFLOOD 0x0004 +#define DEVNULL_PRIV_NOFLOOD 0x0008 +#define DEVNULL_PRIV_CHANHIDE 0x0010 +#define DEVNULL_PRIV_IDLEHIDE 0x0020 +#define DEVNULL_PRIV_CHSERVMODE 0x0040 +#define DEVNULL_PRIV_XTRAOPMODE 0x0080 +#define DEVNULL_PRIV_NETSERVMODE 0x0100 +#define DEVNULL_PRIV_SEEIDLE 0x0200 +#define DEVNULL_PRIV_FORCEIDLEHIDE 0x0400 +#define DEVNULL_PRIV_OVERRIDECC 0x0800 +#define DEVNULL_PRIV_OVERRIDENOAMSG 0x1000 +#define DEVNULL_PRIV_MAXSENDQ 0x2000 +#define DEVNULL_PRIV_OPME 0x4000 + +#define DEVNULL_MODES "abcdefghijklmno" + +#define DEVNULL_HAS_PRIV(cl, tok) ((cl)->modes & DEVNULL_##tok) +#define DEVNULL_SET_PRIV(cl, tok) ((cl)->modes |= DEVNULL_##tok) +#define DEVNULL_CLEAR_PRIV(cl, tok) ((cl)->modes &= ~DEVNULL_##tok) + +struct devnull_class { + unsigned int id; + char *name; + unsigned long modes; + unsigned long maxchan; + unsigned long maxsendq; +}; + +extern void *devnull_check_priv_func; + void init_opserv(const char *nick); -unsigned int gag_create(const char *mask, const char *owner, const char *reason, time_t expires); +unsigned int gag_create(const char *mask, const char *owner, const char *reason, unsigned long expires); int opserv_bad_channel(const char *name); +int devnull_user_has_priv(struct handle_info *hi, int devnull_priv); +struct devnull_class devnull_user_get_class(struct handle_info *hi); +struct devnull_class *devnull_find_id(unsigned int id); +struct devnull_class *devnull_find_name(char *name); +struct userNode* GetOpServ(void); +void operpart(struct chanNode *chan, struct userNode *user); +void operadd(struct userNode *user); +void operdel(struct userNode *user); #endif