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