diff options
author | kiffer <> | 2005-08-04 12:48:16 +0000 |
---|---|---|
committer | kiffer <> | 2005-08-04 12:48:16 +0000 |
commit | 3f710d4a969eeeb9c6fcb8a231fdfd507028f67a (patch) | |
tree | 1035b45516d62058941a9d9a9209fe0eb5c88fb4 | |
parent | 494fc429b101e371b21b3f6e018cc7478a0e8876 (diff) |
trigger nicht loeschen, wenn sie ein nick sind
-rw-r--r-- | bot.pl | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -371,8 +371,16 @@ sub francoise_forget { | |||
371 | 371 | ||
372 | if ($tmp) | 372 | if ($tmp) |
373 | { | 373 | { |
374 | $dbh->do("DELETE FROM knowledge WHERE trigger = ?", undef, $what); | 374 | ($tmp) = $dbh->selectrow_array("SELECT COUNT(*) FROM users WHERE nick = ?", undef, $what); |
375 | $kernel->post('francoise', 'privmsg', $channel, "Mist, seit der letzten Tuete weiss ich nix mehr von $what :("); | 375 | |
376 | if ($tmp) | ||
377 | { | ||
378 | $kernel->post('francoise', 'privmsg', $channel, "$what wird nicht geloescht, das ist ein User!"); | ||
379 | } else | ||
380 | { | ||
381 | $dbh->do("DELETE FROM knowledge WHERE trigger = ?", undef, $what); | ||
382 | $kernel->post('francoise', 'privmsg', $channel, "Mist, seit der letzten Tuete weiss ich nix mehr von $what :("); | ||
383 | } | ||
376 | } else | 384 | } else |
377 | { | 385 | { |
378 | $kernel->post('francoise', 'privmsg', $channel, "$what? Nie von gehoert! *schwoer*"); | 386 | $kernel->post('francoise', 'privmsg', $channel, "$what? Nie von gehoert! *schwoer*"); |