Warning: session_start(): open(/var/lib/php/sessions/sess_hdhsvltkmhs6csni52l4666ajv, 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 AI_WhatDidYouDoTodayBot > AttractorBot {
Long now;
S name;
run {
say("What did you do today?");
}
// CONFIG
class SetNameAttractor > Attractor {
S name;
public bool matches(S s) {
new Matches m;
if "My name is ..."
ret true with name = $1;
if "I have no name"
ret true with name = null;
false;
}
run {
if (nempty(name) && eqic(AI_WhatDidYouDoTodayBot.this.name, name))
ret with say("I know, " + name);
AI_WhatDidYouDoTodayBot.this.name = name;
say("Hello " + or2(name, "stranger"));
}
}
class Attractor1 > Attractor {
public bool matches(S s) {
new Matches m;
if "I ..." true;
false;
}
run {
say(nempty(name)
? switcheroo_youToI(switcheroo_iToName(name, input))
: switcheroo(input));
}
}
*() {
standardAttractors(new SetNameAttractor, new Attractor1);
}
}