]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/Irc.pl
let unclean utf8 in?
[infobot.git] / src / IRC / Irc.pl
index 6303d8d6f02709bf329a8cee8f2361906623509d..19c5bc6a147486d3b95c05c7d09ddd50ee92e30e 100644 (file)
@@ -19,9 +19,6 @@ 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;
 
 # It's probably closer to 510, but let's be cautious until we calculate it extensively.
@@ -105,7 +102,7 @@ sub irc {
 
     my %args = (
         Nick    => $param{'ircNick'},
-        Server  => $resolv,
+        Server  => $resolve,
         Port    => $port,
         Ircname => $param{'ircName'},
     );
@@ -128,6 +125,9 @@ sub irc {
                &ERROR('If this is still a problem, please contact the maintainer.');
            }
            if (defined $conns{$mynick}) {
+               # explicit binmode for socket as "use open" does not seem to work here
+               binmode $conns{$mynick}->{_socket}, ":encoding(UTF-8)";
+
                $conns{$mynick}->maxlinelen($maxlinelen);
 
                # handler stuff.