]> ruin.nu Git - NDIRC.git/blobdiff - Delling.pm
T2 is 70% and T3 is 50% now
[NDIRC.git] / Delling.pm
index 4f779848a476bdddfe74ee2a95f89a5fe0f8fb62..feb1d80cec65ca7b90425c075fc79a74c5552142 100644 (file)
@@ -167,7 +167,6 @@ sub refresh {
        my @row = $dbh->selectrow_array(q{SELECT tick(), max(tick) FROM planet_stats});
        if ($tick != $row[0]){
                $tick = $row[0];
-               $self->toTarget(def => "New tick: $tick");
        }
        if (defined $row[1] && $stattick != $row[1]){
                $stattick = $row[1];
@@ -183,10 +182,9 @@ sub refresh {
        $ircreqs->execute;
        while (my $req = $ircreqs->fetchrow_hashref){
                if ($req->{channel} eq 'def'){
-                       $self->toTarget(def => "<c04>## $req->{username} via webbie ## >></c> $req->{message}");
-                       $self->parseCommand("~report_incs $req->{message}",$irc,$req->{username},' BATCH ','#def-ndawn',$dbh);
+                       $self->toTarget(def => "> __**## $req->{username} via webbie ##**__ >> $req->{message}");
                }else{
-                       $self->toTarget($req->{channel} => "<$req->{username} via webbie> $req->{message}");
+                       $self->toTarget($req->{channel} => "<$req->{username} via webbie> $req->{message}");
                }
                $upircreq->execute($req->{id});
        }
@@ -233,9 +231,16 @@ after discord_message_create => sub {
        my $channel = "D-".$channel_id;
        if (exists $self->discord_channels->{$channel_id}) {
                $channel = 'dm' if ($self->discord_channels->{$channel_id}->{type} == 1);
+       } else
+       {
+               $channel = 'dm';
        }
 
        say localtime(time) . " - $channel_id $channel $author_name $author_id";
+       if ($channel eq 'dm')
+       {
+               say " - '$msg'";
+       }
 
        my $c = NDIRC::DiscordContext->new({
                        discord_id => $author_name,