Warning: session_start(): open(/var/lib/php/sessions/sess_l8n8tgdd435oe7n9fcrmuh7lgu, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
p {
doEvery(600000, f subBot_cleanBlockedIPs);
}
svoid subBot_cleanBlockedIPs {
Collection c = (Collection) get(mainBot(), "blockedIPs");
int n = l(c);
if (n != 0) {
clear(c);
print("Cleared " + n2(n, "blocked IP"));
}
}
answer {
if (!webAuthed()) null;
if "block ip *" {
call(mainBot(), "addBlockedIP", assertIPv4($1));
ret "OK";
}
if "unblock ip *" {
call(mainBot(), "removeBlockedIP", assertIPv4($1));
ret "OK, blocked IPs now: " + askSelf("blocked ips");
}
if "blocked ips"
ret structForUser(cloneList((Collection) get(mainBot(), "blockedIPs")));
if "bad clients"
ret str(subBot_numStalledConnections());
}