X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Delling.pm;h=e04619015f4fdb8e8a5fafc39dfb79c75a5f7580;hb=468a4e3e07c0d9e6ed66a75c73f0d7ff2921b90a;hp=01097f2b318e54b9e2472bf34311e4efca472464;hpb=8211693b922ad772efc64463431f667d3baaceea;p=NDIRC.git diff --git a/Delling.pm b/Delling.pm index 01097f2..e046190 100644 --- a/Delling.pm +++ b/Delling.pm @@ -162,8 +162,9 @@ sub refresh { }); $scans->execute; while (my $scan = $scans->fetchrow_hashref){ - $heap->{irc}->yield(notice => $scan->{nick}, "($scan->{coords} $scan->{type})" - ." http://game.planetarion.com/showscan.pl?scan_id=$scan->{scan_id}"); + $self->message("($scan->{coords} $scan->{type})" + ." http://game.planetarion.com/showscan.pl?scan_id=$scan->{scan_id}" + , @{$scan->{nick}}); $sentscan->execute($scan->{id}); } @@ -236,13 +237,6 @@ after discord_message_create => sub { say localtime(time) . " - $channel_id $channel $author_name $author_id"; - my ($p,$command,$args) = ($msg =~ /^([.!~])(\S+)(?: (.+))?/); - - - return 0 unless $self->disp->has_command($command,$channel); - - say localtime(time) . " - $msg"; - my $c = NDIRC::DiscordContext->new({ discord_id => $author_name, channel_id => $channel_id, @@ -253,7 +247,7 @@ after discord_message_create => sub { discord => $self->discord, }); - return $self->disp->run_command($c,$command,$args); + return $self->handleCommand($c,$msg); };