]> git.donarmstrong.com Git - infobot.git/blob - src/interface.pl
Initial revision
[infobot.git] / src / interface.pl
1 #
2 # interface.pl:
3 #
4 #       Author:
5 #
6
7 ### FIXME.
8 #if (&IsParam("useStrict")) { use strict; }
9
10 sub whatInterface {
11     if (!&IsParam("Interface") or $param{'Interface'} =~ /IRC/) {
12         return "IRC";
13     } else {
14         return "CLI";
15     }
16 }
17
18 sub cliloop {
19     &status("Using CLI...");
20     &status("Now type what you want.");
21
22     $nuh = "local!local\@local";
23     $uh  = "local\@local";
24     $who = "local";
25     $orig{who} = "local";
26     $ident = $param{'ircNick'};
27     $talkchannel = "#CLI";
28     $addressed = 1;
29
30     print ">>> ";
31     while (<STDIN>) {
32         $orig{message} = $_;
33         $_ = &process("local", 'public', $_);
34         print ">>> ";
35     }
36 }
37
38 1;