git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@687
c11ca15a-4712-0410-83d8-
924469b57eb5
$addressed = 1;
$msgType = 'public';
- print ">>> ";
- while (<STDIN>) {
+ # install libterm-readline-gnu-perl to get history support
+ use Term::ReadLine;
+ $term = new Term::ReadLine 'blootbot';
+ $prompt = "$who> ";
+ #$OUT = $term->OUT || STDOUT;
+ while ( defined ($_ = $term->readline($prompt)) ) {
$orig{message} = $_;
$message = $_;
chomp $message;
+ last if ($message =~ m/^quit$/);
$_ = &process() if $message;
- print ">>> ";
}
+ &doExit();
}
1;