Warning: session_start(): open(/var/lib/php/sessions/sess_o4tg71gulpp27er7ofledenuq5, 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
sclass CruddieFollower {
S cookie;
int n;
swappable void newDialog() {}
swappable void botUtterance(S html) {}
*(S cookie) { this(cookie, false); }
*(S *cookie, bool withHistory) {
if (!withHistory)
n = parseInt(loadPageWithParams("https://cruddie.site/bot/n", +cookie);
}
// may block for 60 seconds. returns HTML
public S get() {
S src = loadPageWithParams("https://cruddie.site/bot/incremental",
+cookie, a := zeroToNull(n));
S newN = firstIntAsString_regexp(src);
if (nempty(newN)) {
if (cic(src, "NEW DIALOG -->")) newDialog();
n = parseInt(newN);
} else
doForEach botUtterance(regexpExtractAll([[bot-utterance">(.*?)<]], src));
ret src;
}
}