X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPOE%2FComponent%2FIRC%2FPlugin%2FHello.pm;h=f559fd2e7be9fe000f9dc2b59789ca07d6611423;hb=828747ebb9f361b5a6c735e994a6a15ea539efbf;hp=aa3380609bb82916ca4a87831311b8ac597eef29;hpb=128b9459a22314c185c5ad188693352c616699ef;p=poe-component-irc-plugin-hello.git diff --git a/lib/POE/Component/IRC/Plugin/Hello.pm b/lib/POE/Component/IRC/Plugin/Hello.pm index aa33806..f559fd2 100644 --- a/lib/POE/Component/IRC/Plugin/Hello.pm +++ b/lib/POE/Component/IRC/Plugin/Hello.pm @@ -5,6 +5,7 @@ use strict; use warnings; use utf8; use Encode qw/encode decode/; +use Unicode::Normalize qw/NFC/; our $VERSION = '0.001002'; @@ -21,8 +22,10 @@ sub new { hola hey hi bonjour wassup sup hallo chikmaa tungjatjeta parev salam namaskaar mingalarba ahoy saluton allo moin aloha namaste shalom ciào ciao servus - salve ave merhaba witaj hei hola selam sawubona/, - "what's up", 'que tal', 'こんにちは', '你好', 'ni hao'], + salve ave merhaba witaj hei hola selam sawubona + geodemorgen hoi καλημέρα/, + "what's up", 'que tal', 'こんにちは', '你好', 'ni hao', + 'добро јутро', 'γεια σας', 'bom dia', 'hyvää huomenta'], @_ }; @@ -41,7 +44,7 @@ sub S_public{ my ($self, $irc, $rfullname, $rchannels, $rmessage) = @_; my $nick = parse_user $$rfullname; my $mynick = $irc->nick_name; - my $message = decode 'UTF-8', $$rmessage; + my $message = NFC decode 'UTF-8', $$rmessage; my @hello = @{$self->{greetings}}; my $match = first { $message =~ /^\s*(?:$mynick(?:)[:,])?\s*$_\s*[.!]?\s*$/i } @hello;