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
This commit is contained in:
John Watson
2013-01-22 12:00:18 -08:00
committed by epriestley
parent 5c6201e86a
commit e948073107

View File

@@ -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);