]> ruin.nu Git - NDIRC.git/blobdiff - Bot.pm
Convert all input strings to utf-8
[NDIRC.git] / Bot.pm
diff --git a/Bot.pm b/Bot.pm
index 823daaca3f3096e54c3a405ba66d86fbf03ace6f..b3b4c9d563c73915e09c77a5696a3e7f3af16bb7 100644 (file)
--- a/Bot.pm
+++ b/Bot.pm
@@ -24,6 +24,7 @@ use feature ':5.10';
 
 use Moose;
 
+use POE::Component::IRC::Common qw/irc_to_utf8/;
 use POE::Session;
 use POE::Component::IRC::Plugin::Logger;
 use POE::Component::IRC::Plugin::BotTraffic;
@@ -203,9 +204,11 @@ sub irc_invite {
 }
 
 sub irc_public {
+       $_[ARG2] = irc_to_utf8 $_[ARG2];
 }
 
 sub irc_msg {
+       $_[ARG2] = irc_to_utf8 $_[ARG2];
 }
 
 sub  refresh {