Warning: session_start(): open(/var/lib/php/sessions/sess_2t0u32bj3eontc2bpevr74pp5t, 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
cmodule CurrentTimeDialog > DynSayAndInputBot {
class Bot extends AbstractSayAndInputBot2 implements Runnable {
new L activeAttractors;
abstract class Attractor implements Runnable {
abstract bool matches(S s);
}
class DoItAgain extends Attractor {
bool matches(S s) {
ret matchX2("do it again|again|another time", s);
}
public void run { sayTime(); }
}
class WhatsTheTime extends Attractor {
bool matches(S s) {
ret matchX2("what's the time|tell me the time|time", s);
}
public void run { sayTime(); }
}
public void run {
say("Do you want to know the current time?");
if (yes())
sayTime();
else
say("OK");
}
void sayTime {
say("It is " + localTime_24());
addAttractors(new DoItAgain, new WhatsTheTime);
}
void addAttractors(Attractor... attractors) {
addAll(activeAttractors, attractors);
}
}
Bot makeBot() { ret new Bot; }
}