+use strict;
+
+my $postprocess;
+
+use vars qw($uh $message);
+
+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{'ircUser'};
+ $chan = $talkchannel = "_local";
+ $addressed = 1;
+ $msgType = 'private';
+ $host = 'local';
+
+ # install libterm-readline-gnu-perl to get history support
+ use Term::ReadLine;
+ my $term = new Term::ReadLine 'infobot';
+ my $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();
+}