summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bot.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/bot.pl b/bot.pl
index f0f6459..fb5b336 100644
--- a/bot.pl
+++ b/bot.pl
@@ -365,6 +365,18 @@ sub francoise_alias{
365} 365}
366 366
367sub francoise_forget { 367sub francoise_forget {
368 my ($kernel, $channel, $what) = @_;
369
370 my ($tmp) = $dbh->selectrow_array("SELECT COUNT(*) FROM knowledge WHERE trigger = ?", undef, $what);
371
372 if ($tmp)
373 {
374 $dbh->do("DELETE FROM knowledge WHERE trigger = ?", undef, $what);
375 $kernel->post('francoise', 'privmsg', $channel, "Mist, seit der letzten Tuete weiss ich nix mehr von $what :(");
376 } else
377 {
378 $kernel->post('francoise', 'privmsg', $channel, "$what? Nie von gehoert! *schwoer*");
379 }
368} 380}
369 381
370sub francoise_donothing { 382sub francoise_donothing {