Warning: session_start(): open(/var/lib/php/sessions/sess_blb0elhd0voe54m4irmbcvhcbh, 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
concept Entry {
S keyword, code;
bool enabled = true;
}
set flag DynModule.
module KeywordToCode > DynCRUD {
*() { super(Entry); }
start {
db();
dm_onTopInput(voidfunc(fS s) {
thread {
//print("KtC got: " + s);
for (Entry e : list(Entry))
if (e.enabled && matchVBarPattern(e.keyword, s)) {
print("KtC running " + e.id);
S code = trim(e.code);
bool say = startsWith(code, "=");
if (say) code = substring(code, 1);
try {
O result = dm_evalJava_withModule(code);
if (say) dm_say(strOrNull(result));
} catch print e {
if (say) dm_say("Internal error, Sir");
}
}
}
});
}
}