diff options
-rw-r--r-- | bot.pl | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -365,6 +365,18 @@ sub francoise_alias{ | |||
365 | } | 365 | } |
366 | 366 | ||
367 | sub francoise_forget { | 367 | sub 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 | ||
370 | sub francoise_donothing { | 382 | sub francoise_donothing { |