X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FFonBot%2FPlugin%2FHTTPD.pm;h=1efec362990f6b4f3ce5b20623cc2bad7cbd08ec;hb=b8d4a54731323949ef92a5300862476fc712f215;hp=555ba375ad897dc74b89ee27436addfebd54e16f;hpb=3a98da812b3bd7beb54cc540a31a399d0ad220cd;p=app-fonbot-daemon.git diff --git a/lib/App/FonBot/Plugin/HTTPD.pm b/lib/App/FonBot/Plugin/HTTPD.pm index 555ba37..1efec36 100644 --- a/lib/App/FonBot/Plugin/HTTPD.pm +++ b/lib/App/FonBot/Plugin/HTTPD.pm @@ -1,6 +1,6 @@ package App::FonBot::Plugin::HTTPD; -our $VERSION = '0.000_4'; +our $VERSION = '0.001'; use v5.14; use strict; @@ -33,7 +33,7 @@ sub init{ %waiting_requests = (); %waiting_userrequests = (); $httpd = POE::Component::Server::HTTP->new( - Port => 8888, + Port => $httpd_port, PreHandler => { '/' => [\&pre_auth, \&pre_get, \&pre_userget], }, ContentHandler =>{ '/send' => \&on_send, '/get' => \&on_get, '/ok' => \&on_ok, '/userget' => \&on_userget, '/usersend' => \&on_usersend }, ErrorHandler => { '/' => sub { RC_OK }}, @@ -196,7 +196,7 @@ sub on_send{ if ($driver eq 'HTTP') { $responses{$user}//=[]; - push $responses{$user}, $content; + push @{$responses{$user}}, $content; if (exists $waiting_userrequests{$user}) { $waiting_userrequests{$user}->continue; delete $waiting_userrequests{$user} @@ -304,7 +304,7 @@ Marius Gavrilescu C<< marius@ieval.ro >> =head1 COPYRIGHT AND LICENSE -Copyright 2013 Marius Gavrilescu +Copyright 2013-2015 Marius Gavrilescu This file is part of fonbotd.