diff options
-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*"); |