]> git.donarmstrong.com Git - infobot.git/commitdiff
stdin support - testing
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 25 Jul 2004 00:42:32 +0000 (00:42 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 25 Jul 2004 00:42:32 +0000 (00:42 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1013 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl
src/IRC/IrcHooks.pl

index e07ab2673eb0d21a3a4b2a1eac7e63592e140d75..cf2d86b59c32329aea0beadd4870393688512d2b 100644 (file)
@@ -6,7 +6,9 @@
 #
 
 use strict;
+
 no strict 'refs';
+no strict 'subs'; # IN/STDIN
 
 use vars qw(%floodjoin %nuh %dcc %cache %conns %channels %param %mask
        %chanconf %orig %ircPort %ircstats %last %netsplit);
@@ -17,6 +19,9 @@ use vars qw($notcount $nottime $notsize $msgcount $msgtime $msgsize
 use vars qw($b_blue $ob);
 use vars qw(@ircServers);
 
+use open ':utf8';
+use open ':std';
+
 $nickserv      = 0;
 my $maxlinelen = 400;
 
@@ -170,10 +175,9 @@ sub irc {
 
     $ircstats{'Server'}        = "$server:$port";
 
-    #&DEBUG("foo" . <STDIN>);
-    #open(FH, "<:utf8", "input");
-    #$irc->addfh(<STDIN>, \&on_stdin, "r");
-    #close(STDIN);
+    $irc->addfh(STDIN, \&on_stdin, "r");
+
+    &status("starting main loop");
 
     $irc->start;
 }
index aa922118e6bbf4f4f85fe5f240f6afa535707a47..ca6bcce696c6820bac705a657637b9e9af72f47e 100644 (file)
@@ -1262,8 +1262,6 @@ sub on_useronchan {
 
 # TODO not used yet
 sub on_stdin {
-    &FIXME("on_stdin");
-
     my $line = <STDIN>;
     chomp($line);
     &FIXME("on_stdin: line => \"$line\"");