Warning: session_start(): open(/var/lib/php/sessions/sess_uq0gkuc46hlk7t3rq30tpdu1os, 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
sclass ConnectToServer extends DynBigNumber {
transient DialogIO io;
void cleanMeUp {
if (io != null) io.close();
}
void start {
super.start();
setDescription("COMPUTERS ONLINE");
connect();
doEvery(30000, r {
if (io != null) io.sendLine("");
});
}
void connect {
thread "Connect" {
while licensed {
pcall {
io = talkTo("smartbot.botcompany.de", 6000);
io.getSocket().setSoTimeout(30000+10000);
print("Connected.");
temp tempAfterwards(r { print("Disconnected.") });
io.sendLine(format("computerID=*", computerID()));
io.sendLine(format("sub *", "computerCount"));
S line;
while ((line = io.readLine()) != null) {
if (nempty(line)) print("Have msg: " + line);
new Matches m;
if (swic(line, "ComputerCount = ", m))
setField(data := parseInt($1));
}
}
io = null;
sleepSeconds(5);
}
}
}
}