diff --git a/PlayBot.pl b/PlayBot.pl index 8aa93af7eed78ccc587220330f29092f4e7b1e7b..880e20d95e82c45ae03dc57ae28bbe904694116b 100755 --- a/PlayBot.pl +++ b/PlayBot.pl @@ -119,6 +119,14 @@ sub later $irc->yield(privmsg => $nick => '['.$id.'] '.$donnees[2].' | '.$donnees[1]); $irc->yield(privmsg => $nick => $donnees[0]); + # save the content in the history + my $sth2 = $dbh->prepare_cached(' + INSERT INTO playbot_chan (content, chan, sender_irc) + VALUES (?,?,?)'); + $log->error("Couldn't prepare querie; aborting") unless (defined $sth2); + $sth2->execute($id, $nick, $nick) + or $log->error("Couldn't finish transaction: " . $dbh->errstr); + $lastID{$nick} = $id; } }