# Version: v0.1 (20021028)
# Created: 20021028
#
+use strict;
+
+my $postprocess;
sub cliloop {
&status("Using CLI...");
# install libterm-readline-gnu-perl to get history support
use Term::ReadLine;
- $term = new Term::ReadLine 'blootbot';
- $prompt = "$who> ";
+ my $term = new Term::ReadLine 'blootbot';
+ my $prompt = "$who> ";
#$OUT = $term->OUT || STDOUT;
while ( defined ($_ = $term->readline($prompt)) ) {
$orig{message} = $_;
return;
}
+ if ( $postprocess ) {
+ undef $postprocess;
+ } elsif ($postprocess = &getChanConf('postprocess', $talkchannel)) {
+ &DEBUG("say: $postprocess $msg");
+ &parseCmdHook("main", $postprocess . ' ' . $msg);
+ &parseCmdHook("extra", $postprocess . ' ' . $msg);
+ undef $postprocess;
+ return;
+ }
+
&status(">$nick< $msg");
print("$nick: $msg\n");