Warning: session_start(): open(/var/lib/php/sessions/sess_1fdbbn23m2nc64c2jlu0r34s9t, 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
static O obj;
concept Obj {
S structure;
}
p {
db();
loadObj();
bot();
}
svoid loadObj {
obj = null;
Obj o = findConcept(Obj);
if (o != null)
obj = unstructure(o.structure);
}
svoid setObj(O newObj) {
cset(uniq(Obj), structure := structure(newObj));
loadObj();
}
sS haveMsg() {
ret "Have object of type " + getClassName(obj);
}
answer {
if (startsWith(s, "string =", m)) {
S newObj = unquoteIfProperlyQuoted(trim($1));
setObj(newObj);
ret haveMsg();
}
if (eq(s, "!obj"))
ret haveMsg();
if (eq(s, "!structure"))
ret structure(obj);
if (startsWithWord(s, "!op", m)) {
S functionName = unquote($1);
O newObj = makeAndCall(functionName, obj);
setObj(newObj);
ret haveMsg();
}
}