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("main", $postprocess . ' ' . $msg);
58 &parseCmdHook("extra", $postprocess . ' ' . $msg);
63 &status(">$nick< $msg");
65 print("$nick: $msg\n");
68 # Usage: &action(nick || chan, txt);
70 my ($target, $txt) = @_;
72 &WARN("action: txt == NULL.");
76 if (length $txt > 480) {
77 &status("action: txt too long; truncating.");
78 chop($txt) while (length $txt > 480);
81 &status("* $ident/$target $txt");
85 my ($nick,$chan) = @_;
89 sub performStrictReply {
97 sub performAddressedReply {
98 return unless ($addressed);