whee
This commit is contained in:
parent
708b96c808
commit
342790a3fe
2 changed files with 6 additions and 11 deletions
|
@ -6,7 +6,7 @@ use autodie;
|
||||||
|
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
use JSON::XS;
|
use JSON::XS;
|
||||||
use Time::Duration;
|
use POSIX qw/strftime/;
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@ sub get_player_pos {
|
||||||
if ($resp->is_success()) {
|
if ($resp->is_success()) {
|
||||||
$ls = 1;
|
$ls = 1;
|
||||||
my $cont = $resp->content();
|
my $cont = $resp->content();
|
||||||
my $strut = decode_json($cont);
|
open(my $fh, ">", "positions/players-".strftime("%FT%T", localtime()).".json");
|
||||||
open(my $fh, ">", "players-$crash.json");
|
print $fh "/*".$resp->code()." ".$resp->message() . "*/";
|
||||||
print $fh "/*".localtime()."*/";
|
print $fh $cont;
|
||||||
print $fh Dumper($strut);
|
print "SUCCESS $ls $crash /*".$resp->code()." ".$resp->message() . "*/\n";
|
||||||
print Dumper($strut);
|
|
||||||
close($fh);
|
close($fh);
|
||||||
} else {
|
} else {
|
||||||
|
print "CRASH $ls $crash\n";
|
||||||
$crash++ if ($ls == 1);
|
$crash++ if ($ls == 1);
|
||||||
$ls = 0;
|
$ls = 0;
|
||||||
}
|
}
|
||||||
|
|
5
main.pl
5
main.pl
|
@ -26,11 +26,6 @@ my $info = $bot->load("DirkMod");
|
||||||
my $seen = $bot->load("MySeen");
|
my $seen = $bot->load("MySeen");
|
||||||
my $rss = $bot->load("RssPromote");
|
my $rss = $bot->load("RssPromote");
|
||||||
my $spam = $bot->load("Spam");
|
my $spam = $bot->load("Spam");
|
||||||
my $irc = $bot->pocoirc();
|
|
||||||
|
|
||||||
$irc->plugin_add( 'NickServID', POE::Component::IRC::Plugin::NickServID->new(
|
|
||||||
Password => 'sindarin'
|
|
||||||
));
|
|
||||||
|
|
||||||
$info->set(user_require_question => 0);
|
$info->set(user_require_question => 0);
|
||||||
$info->set(user_passive_answer => 1);
|
$info->set(user_passive_answer => 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue