X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fopserv.h;h=169f43218b4df1ad1e34265c3bf2e135d72ee0ac;hb=HEAD;hp=630e8b6ce890caca21922fd78580a15f22b8fe14;hpb=c311c6c83e9bbc9f08cf8da211a9f64d01edd201;p=srvx.git diff --git a/src/opserv.h b/src/opserv.h index 630e8b6..169f432 100644 --- a/src/opserv.h +++ b/src/opserv.h @@ -21,42 +21,49 @@ #ifndef _opserv_h #define _opserv_h -/* DEVNULL_MODE_* go into devnull_class.modes */ -#define DEVNULL_MODE_A 0x00000001 -#define DEVNULL_MODE_B 0x00000002 -#define DEVNULL_MODE_C 0x00000004 -#define DEVNULL_MODE_D 0x00000008 -#define DEVNULL_MODE_E 0x00000010 -#define DEVNULL_MODE_F 0x00000020 -#define DEVNULL_MODE_G 0x00000040 -#define DEVNULL_MODE_H 0x00000080 -#define DEVNULL_MODE_I 0x00000100 -#define DEVNULL_MODE_J 0x00000200 -#define DEVNULL_MODE_K 0x00000400 -#define DEVNULL_MODE_L 0x00000800 -#define DEVNULL_MODE_M 0x00001000 -#define DEVNULL_MODE_N 0x00002000 - -#define DEVNULL_MODES "abcdefghijklmn" - -#define DEVNULL_FLAGGED(hi, tok) ((hi)->modes & DEVNULL_##tok) -#define DEVNULL_SET_FLAG(hi, tok) ((hi)->modes |= DEVNULL_##tok) -#define DEVNULL_CLEAR_FLAG(hi, tok) ((hi)->modes &= ~DEVNULL_##tok) +/* 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_PRIV_##tok) +#define DEVNULL_SET_PRIV(cl, tok) ((cl)->modes |= DEVNULL_PRIV_##tok) +#define DEVNULL_CLEAR_PRIV(cl, tok) ((cl)->modes &= ~DEVNULL_PRIV_##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, unsigned long expires); int opserv_bad_channel(const char *name); -void devnull_delete(const char *auth); -void devnull_rename(const char *oldauth, const char *newauth); -int devnull_check(const char *name); -struct devnull_class* devnull_get(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(const 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