2 # CLI/Support.pl: Stubs for functions that are from IRC/*
3 # Author: Tim Riker <Tim@Rikers.org>
4 # Version: v0.1 (20021028)
12 &status("Using CLI...");
13 &status("Now type what you want.");
15 $nuh = "local!local\@local";
19 $ident = $param{'ircUser'};
20 $chan = $talkchannel = "_local";
25 # install libterm-readline-gnu-perl to get history support
27 my $term = new Term::ReadLine 'blootbot';
28 my $prompt = "$who> ";
29 #$OUT = $term->OUT || STDOUT;
30 while ( defined ($_ = $term->readline($prompt)) ) {
34 last if ($message =~ m/^quit$/);
35 $_ = &process() if $message;
41 my ($nick, $msg) = @_;
43 &ERROR("msg: nick == NULL.");
49 &WARN("msg: msg == $msg.");
55 } elsif ($postprocess = &getChanConf('postprocess', $talkchannel)) {
56 &DEBUG("say: $postprocess $msg");
57 &parseCmdHook($postprocess . ' ' . $msg);
62 &status(">$nick< $msg");
64 print("$nick: $msg\n");
67 # Usage: &action(nick || chan, txt);
69 my ($target, $txt) = @_;
71 &WARN("action: txt == NULL.");
75 if (length $txt > 480) {
76 &status("action: txt too long; truncating.");
77 chop($txt) while (length $txt > 480);
80 &status("* $ident/$target $txt");
84 my ($nick,$chan) = @_;
88 sub performStrictReply {
96 sub performAddressedReply {
97 return unless ($addressed);