_ignoredChannels = unserialize(SCRAPE_IRC_SOURCE_IGNORE); } else { $this->_ignoredChannels = array( '#a.b.cd.image' => false, '#a.b.console.ps3' => false, '#a.b.dvd' => false, '#a.b.erotica' => false, '#a.b.flac' => false, '#a.b.foreign' => false, '#a.b.games.nintendods' => false, '#a.b.inner-sanctum' => false, '#a.b.moovee' => false, '#a.b.movies.divx' => false, '#a.b.sony.psp' => false, '#a.b.sounds.mp3.complete_cd' => false, '#a.b.teevee' => false, '#a.b.games.wii' => false, '#a.b.warez' => false, '#a.b.games.xbox360' => false, '#pre@corrupt' => false, '#scnzb' => false, '#tvnzb' => false, 'omgwtfnzbs' => false, 'orlydb' => false, 'prelist' => false, 'srrdb' => false, 'u4all.eu' => false, 'zenet' => false ); } $this->_categoryIgnoreRegex = false; if (defined('SCRAPE_IRC_CATEGORY_IGNORE') && SCRAPE_IRC_CATEGORY_IGNORE !== '') { $this->_categoryIgnoreRegex = SCRAPE_IRC_CATEGORY_IGNORE; } $this->_titleIgnoreRegex = false; if (defined('SCRAPE_IRC_TITLE_IGNORE') && SCRAPE_IRC_TITLE_IGNORE !== '') { $this->_titleIgnoreRegex = SCRAPE_IRC_TITLE_IGNORE; } $this->_pdo = new DB(); $this->_groupList = array(); $this->_silent = $silent; $this->_debug = $debug; $this->_resetPreVariables(); $this->_startScraping(); } public function __destruct() { parent::__destruct(); } /** * Main method for scraping. * * @access protected */ protected function _startScraping() { // Connect to IRC. if ($this->connect(SCRAPE_IRC_SERVER, SCRAPE_IRC_PORT, SCRAPE_IRC_TLS) === false) { exit ( 'Error connecting to (' . SCRAPE_IRC_SERVER . ':' . SCRAPE_IRC_PORT . '). Please verify your server information and try again.' . PHP_EOL ); } // Login to IRC. if ($this->login(SCRAPE_IRC_NICKNAME, SCRAPE_IRC_REALNAME, SCRAPE_IRC_USERNAME, SCRAPE_IRC_PASSWORD) === false) { exit('Error logging in to: (' . SCRAPE_IRC_SERVER . ':' . SCRAPE_IRC_PORT . ') nickname: (' . SCRAPE_IRC_NICKNAME . '). Verify your connection information, you might also be banned from this server or there might have been a connection issue.' . PHP_EOL ); } // Join channels. $this->joinChannels(array('#nZEDbPRE' => null)); if (!$this->_silent) { echo '[' . date('r') . '] [Scraping of IRC channels for (' . SCRAPE_IRC_SERVER . ':' . SCRAPE_IRC_PORT . ') (' . SCRAPE_IRC_NICKNAME . ') started.]' . PHP_EOL; } // Scan incoming IRC messages. $this->readIncoming(); } /** * Process bot messages, insert/update PREs. * * @access protected */ protected function processChannelMessages() { if (preg_match( '/^(NEW|UPD|NUK): \[DT: (?P