diff options
author | kiffer <> | 2005-08-04 12:09:37 +0000 |
---|---|---|
committer | kiffer <> | 2005-08-04 12:09:37 +0000 |
commit | 494fc429b101e371b21b3f6e018cc7478a0e8876 (patch) | |
tree | 8ed58e678750d5333a8c2dcbd700aa9cc1897d43 | |
parent | e166c810083dec53e36c1821f12805c2609dc1e5 (diff) |
!forget implementiert
-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 { |