#include "../core/schedule.h"
#include "../irc/irc.h"
#include "../lib/stringbuf.h"
-#include "../noperserv/noperserv.h"
-#include "../noperserv/noperserv_policy.h"
+#include "../control/control.h"
+#include "../control/control_policy.h"
#include "trusts.h"
MODULE_VERSION("");
return 1;
}
+static int modifyunthrottle(void *arg, char *num, nick *source, int override) {
+ trustgroup *tg = arg;
+
+ if(num[0] == '1') {
+ tg->flags |= TRUST_UNTHROTTLE;
+ } else if(num[0] == '0') {
+ tg->flags &= ~TRUST_UNTHROTTLE;
+ } else {
+ return 0;
+ }
+
+ return 1;
+}
+
static int modifyexpires(void *arg, char *expires, nick *source, int override) {
trustgroup *tg = arg;
int howlong = durationtolong(expires);
if(irc_in_addr_is_ipv4(&th->ip))
nodebits += 96;
+ if(nodebits > 128) {
+ controlreply(source, "Node bits is invalid.");
+ return 0;
+ }
+
if(!override) {
int minbits = irc_in_addr_is_ipv4(&th->ip)?TRUST_MIN_UNPRIVILEGED_NODEBITS_IPV4:TRUST_MIN_UNPRIVILEGED_NODEBITS_IPV6;
MSGROUP(trustedfor);
MSGROUP(cleanup);
MSGROUP(protected);
+ MSGROUP(unthrottle);
MSHOST(maxpernode);
MSHOST(nodebits);