From e948073107f8b03b43a8130181b91a5b1c20eaa1 Mon Sep 17 00:00:00 2001 From: John Watson Date: Tue, 22 Jan 2013 12:00:18 -0800 Subject: [PATCH] Global ignore list for IRCBot Summary: ignore - array - Array of nicks to ignore all mesages from Test Plan: run phabot with ignore set Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4582 --- src/infrastructure/daemon/irc/PhabricatorIRCBot.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/infrastructure/daemon/irc/PhabricatorIRCBot.php b/src/infrastructure/daemon/irc/PhabricatorIRCBot.php index c50d682963..a75352d589 100644 --- a/src/infrastructure/daemon/irc/PhabricatorIRCBot.php +++ b/src/infrastructure/daemon/irc/PhabricatorIRCBot.php @@ -211,6 +211,11 @@ final class PhabricatorIRCBot extends PhabricatorDaemon { } private function routeMessage(PhabricatorIRCMessage $message) { + $ignore = $this->getConfig('ignore'); + if ($ignore && in_array($message->getSenderNickName(), $ignore)) { + return; + } + foreach ($this->handlers as $handler) { try { $handler->receiveMessage($message);