Permalink
Browse files

Added fix for issue #211. Plugin Remind: The bot can't be the recipie…

…nt. (This time I hopefully did it in a separate branch. :-/)
  • Loading branch information...
1 parent fc53643 commit 557846ae1d85abee7936b89063f6d4ae70662091 Marcel Glacki committed Apr 20, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 Phergie/Plugin/Remind.php
View
8 Phergie/Plugin/Remind.php
@@ -164,6 +164,14 @@ protected function handleRemind($recipient, $message)
{
$source = $this->getEvent()->getSource();
$nick = $this->getEvent()->getNick();
+
+ // The bot shouldn't be the recipient
+ // Fix for issue #211
+ $myself = $this->getConnection()->getNick();
+ if ($myself == $recipient) {
+ $this->doPrivmsg($source, '<meme>You are doing it wrong</meme>');
+ return;
+ }
if (!$this->getEvent()->isInChannel()) {
$this->doPrivmsg($source, 'Reminders must be requested in-channel.');

0 comments on commit 557846a

Please sign in to comment.