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