X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/4e52c61dcb5a5c1bfd684b217c39a28381b6275d..440cd7e63ac2b059ea1a467a2e4e2244faf92cb3:/control/control.h diff --git a/control/control.h b/control/control.h index dc43662e..c4bc6298 100644 --- a/control/control.h +++ b/control/control.h @@ -2,19 +2,17 @@ #ifndef __CONTROL_H #define __CONTROL_H +#include "control_db.h" +#include "../lib/flags.h" #include "../parser/parser.h" #include "../nick/nick.h" #include "../channel/channel.h" #define registercontrolcmd(a, b, c, d) registercontrolhelpcmd(a, b, c, d, NULL) -typedef void (*ControlMsg)(nick *, char *, ... ); -typedef void (*ControlWall)(flag_t, flag_t, char *, ...); -typedef int (*ControlPermitted)(flag_t, nick *); - -extern ControlMsg controlreply; -extern ControlWall controlwall; -extern ControlPermitted controlpermitted; +void controlreply(nick *, char *, ...); +void controlwall(flag_t, flag_t, char *, ...); +int controlpermitted(flag_t, nick *); extern nick *mynick; @@ -101,4 +99,18 @@ char *controlid(nick *); #define NL_ALL_COMMANDS 0x2000 /* every single command sent */ #define NL_GLINES_AUTO 0x4000 /* automated gline messages */ +extern int noperserv_ext; + +extern const flag no_userflags[]; +extern const flag no_noticeflags[]; +extern const flag no_commandflags[]; + +#define NO_NICKS_PER_WHOIS_LINE 3 + +#define NOGetAuthedUser(user) (no_autheduser *)(user->auth ? user->auth->exts[noperserv_ext] : NULL) +#define NOGetAuthLevel(user) user->authlevel +#define NOGetNoticeLevel(user) user->noticelevel +#define NOMax(a, b) (a>b?a:b) +#define NOMin(a, b) (a