git.annexia.org
/
xavierbot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Misc. ancient changes to xavierbot.
[xavierbot.git]
/
xavierbot.pl.in
diff --git
a/xavierbot.pl.in
b/xavierbot.pl.in
index
c0e0f82
..
f1a4cc8
100755
(executable)
--- a/
xavierbot.pl.in
+++ b/
xavierbot.pl.in
@@
-2,7
+2,7
@@
# xavierbot : an OCaml interpreter IRC bot.
# By Richard W.M. Jones <rich@annexia.org>.
# This code is in the Public Domain.
# xavierbot : an OCaml interpreter IRC bot.
# By Richard W.M. Jones <rich@annexia.org>.
# This code is in the Public Domain.
-# $Id: xavierbot.pl.in,v 1.
8 2007/07/05 12:43:14
rjones Exp $
+# $Id: xavierbot.pl.in,v 1.
9 2008/01/23 15:44:46
rjones Exp $
use strict;
use POE qw(Component::IRC Wheel::Run);
use strict;
use POE qw(Component::IRC Wheel::Run);
@@
-112,6
+112,11
@@
sub irc_public
$kernel->post ($sender => privmsg => $channel => $_)
foreach (@usage);
}
$kernel->post ($sender => privmsg => $channel => $_)
foreach (@usage);
}
+ elsif ($what =~ /^\s*xavierbot\b.*\brestart\b/) {
+ $sleeping = 0;
+ print STDOUT "got instruction to restart ...\n";
+ restart_toplevel ($heap->{ocaml});
+ }
elsif (!$sleeping) {
if (my ($stmt) = $what =~ m/^\s*([^\#].*;;)\s*$/) {
$heap->{ocaml}->put ("$stmt\n");
elsif (!$sleeping) {
if (my ($stmt) = $what =~ m/^\s*([^\#].*;;)\s*$/) {
$heap->{ocaml}->put ("$stmt\n");
@@
-128,11
+133,6
@@
sub irc_public
$kernel->post ($sender => privmsg => $channel =>
"xavierbot wakes up");
}
$kernel->post ($sender => privmsg => $channel =>
"xavierbot wakes up");
}
- elsif ($what =~ /^\s*xavierbot\b.*\brestart\b/) {
- $sleeping = 0;
- print STDOUT "got instruction to restart ...\n";
- restart_toplevel ($heap->{ocaml});
- }
}
undef;
}
}
undef;
}