X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/83ff05c356f6497be2475640d1cb2e3eb369831f..8dc0685213ead3f8896c83cadc130143ccc4d181:/src/opserv.h diff --git a/src/opserv.h b/src/opserv.h index 8add3e6..9b551de 100644 --- a/src/opserv.h +++ b/src/opserv.h @@ -3,7 +3,7 @@ * * This file is part of x3. * - * srvx is free software; you can redistribute it and/or modify + * x3 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. @@ -21,8 +21,33 @@ #ifndef _opserv_h #define _opserv_h +#define DEFCON_NO_NEW_CHANNELS 1 /* No New Channel Registrations */ +#define DEFCON_NO_NEW_NICKS 2 /* No New Nick Registrations */ +#define DEFCON_NO_MODE_CHANGE 4 /* No channel MODE changes */ +#define DEFCON_FORCE_CHAN_MODES 8 /* Force Chan Mode */ +#define DEFCON_REDUCE_SESSION 16 /* Reduce Session Limit */ +#define DEFCON_NO_NEW_CLIENTS 32 /* Kill any NEW clients */ +#define DEFCON_OPER_ONLY 64 /* Restrict services to oper's only */ +#define DEFCON_SILENT_OPER_ONLY 128 /* Silently ignore non-opers */ +#define DEFCON_GLINE_NEW_CLIENTS 256 /* Gline any new clients */ +#define DEFCON_NO_NEW_MEMOS 512 /* No New Memos Sent */ +#define DEFCON_SHUN_NEW_CLIENTS 1024 /* Shun any new clients */ + +extern int DefCon[6]; +extern int checkDefCon(int level); +extern void DefConProcess(struct userNode *user); +extern void defcon_timeout(UNUSED_ARG(void *data)); + void init_opserv(const char *nick); unsigned int gag_create(const char *mask, const char *owner, const char *reason, time_t expires); int opserv_bad_channel(const char *name); +struct routingPlan* opserv_add_routing_plan(const char *name); +unsigned int opserv_conf_admin_level(); +void routing_handle_connect_failure(struct server *source, char *server, char *message); +int activate_routing(struct svccmd *cmd, struct userNode *user, char *plan_name); +void routing_handle_squit(char *server, char* uplink, char *message); +void routing_handle_connect(char *server, char *uplink); +void reroute_timer_reset(unsigned int time); +void routing_init(); #endif