# xavierbot : an OCaml interpreter IRC bot.
# By Richard W.M. Jones <rich@annexia.org>.
# This code is in the Public Domain.
-# $Id: xavierbot.pl,v 1.4 2007/06/28 20:49:10 rjones Exp $
+# $Id: xavierbot.pl,v 1.5 2007/06/28 23:18:28 rjones Exp $
use strict;
-
use POE qw(Component::IRC Wheel::Run);
-$ENV{PATH} = "/usr/bin:/bin";
-
#----------------------------------------------------------------------
# Start of configuration.
# End of configuration.
#----------------------------------------------------------------------
+$ENV{PATH} = "/usr/bin:/bin";
+
POE::Session->create (
package_states => [
main => [ qw(_default _start irc_001 irc_public got_stdout) ],
print "got: $what\n";
if (my ($stmt) = $what =~ /^\s*([^#].*;;)\s*$/) {
- print "stmt = $stmt\n";
$heap->{ocaml}->put ("$stmt\n");
}
+ elsif ($what =~ /$nick.*restart/) {
+ print STDOUT "got instruction to restart ...\n"
+ }
undef;
}