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{'ircNick'};
17 $chan = $talkchannel = "_local";
21 # install libterm-readline-gnu-perl to get history support
23 $term = new Term::ReadLine 'blootbot';
25 #$OUT = $term->OUT || STDOUT;
26 while ( defined ($_ = $term->readline($prompt)) ) {
30 last if ($message =~ m/^quit$/);
31 $_ = &process() if $message;
37 my ($nick, $msg) = @_;
39 &ERROR("msg: nick == NULL.");
45 &WARN("msg: msg == $msg.");
49 &status(">$nick< $msg");
51 print("$nick: $msg\n");
54 # Usage: &action(nick || chan, txt);
56 my ($target, $txt) = @_;
58 &WARN("action: txt == NULL.");
62 if (length $txt > 480) {
63 &status("action: txt too long; truncating.");
64 chop($txt) while (length $txt > 480);
67 &status("* $ident/$target $txt");
71 my ($nick,$chan) = @_;
75 sub performStrictReply {
83 sub performAddressedReply {
84 return unless ($addressed);