# Created: 20021028
#
+sub cliloop {
+ &status("Using CLI...");
+ &status("Now type what you want.");
+
+ $nuh = "local!local\@local";
+ $uh = "local\@local";
+ $who = "local";
+ $orig{who} = "local";
+ $ident = $param{'ircNick'};
+ $chan = $talkchannel = "_local";
+ $addressed = 1;
+ $msgType = 'public';
+
+ # 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;
+ }
+ &doExit();
+}
+
sub msg {
my ($nick, $msg) = @_;
if (!defined $nick) {
}
}
-sub cliloop {
- &status("Using CLI...");
- &status("Now type what you want.");
-
- $nuh = "local!local\@local";
- $uh = "local\@local";
- $who = "local";
- $orig{who} = "local";
- $ident = $param{'ircNick'};
- $chan = $talkchannel = "_local";
- $addressed = 1;
- $msgType = 'public';
-
- # 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;
- }
- &doExit();
-}
-
1;