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];
$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});
}
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,