summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkiffer <>2005-08-04 12:09:37 +0000
committerkiffer <>2005-08-04 12:09:37 +0000
commit494fc429b101e371b21b3f6e018cc7478a0e8876 (patch)
tree8ed58e678750d5333a8c2dcbd700aa9cc1897d43
parente166c810083dec53e36c1821f12805c2609dc1e5 (diff)
!forget implementiert
-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 {