2 # CLI/Support.pl: Stubs for functions that are from IRC/*
3 # Author: Tim Riker <Tim@Rikers.org>
4 # Version: v0.1 (20021028)
9 &status("Using CLI...");
10 &status("Now type what you want.");
12 $nuh = "local!local\@local";
16 $ident = $param{'ircUser'};
17 $chan = $talkchannel = "_local";
22 # install libterm-readline-gnu-perl to get history support
24 $term = new Term::ReadLine 'blootbot';
26 #$OUT = $term->OUT || STDOUT;
27 while ( defined ($_ = $term->readline($prompt)) ) {
31 last if ($message =~ m/^quit$/);
32 $_ = &process() if $message;
38 my ($nick, $msg) = @_;
40 &ERROR("msg: nick == NULL.");
46 &WARN("msg: msg == $msg.");
50 &status(">$nick< $msg");
52 print("$nick: $msg\n");
55 # Usage: &action(nick || chan, txt);
57 my ($target, $txt) = @_;
59 &WARN("action: txt == NULL.");
63 if (length $txt > 480) {
64 &status("action: txt too long; truncating.");
65 chop($txt) while (length $txt > 480);
68 &status("* $ident/$target $txt");
72 my ($nick,$chan) = @_;
76 sub performStrictReply {
84 sub performAddressedReply {
85 return unless ($addressed);