Warning: session_start(): open(/var/lib/php/sessions/sess_6sku4els1ofbaih6hamhs2eg21, 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();
}
answer {
if (startsWith(s, "string =", m)) {
S newObj = unquoteIfProperlyQuoted($1);
setObj(newObj);
ret "Have object of type " + getClassName(obj);
}
if (eq(s, "!obj"))
ret "Have object of type " + getClassName(obj);
if (startsWithWord(s, "!op", m)) {
S functionName = unquote($1);
newObj = makeAndCall(functionName, obj);
setObj(newObj);
}
}