_ignoredChannels = unserialize( SCRAPE_IRC_SOURCE_IGNORE, ['allowed_classes' => ['#a.b.cd.image', '#a.b.console.ps3', '#a.b.dvd', '#a.b.erotica', '#a.b.flac', '#a.b.foreign', '#a.b.games.nintendods', '#a.b.inner-sanctum', '#a.b.moovee', '#a.b.movies.divx', '#a.b.sony.psp', '#a.b.sounds.mp3.complete_cd', '#a.b.teevee', '#a.b.games.wii', '#a.b.warez', '#a.b.games.xbox360', '#pre@corrupt', '#scnzb', '#tvnzb', 'srrdb', ], ] ); } else { $this->_ignoredChannels = [ '#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, 'srrdb' => 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 = []; $this->_silent = $silent; $this->_debug = $debug; $this->_resetPreVariables(); $this->_startScraping(); } public function __destruct() { parent::__destruct(); } /** * Main method for scraping. */ 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. $channels = defined('SCRAPE_IRC_CHANNELS') ? unserialize(SCRAPE_IRC_CHANNELS, ['allowed_classes' => ['#PreNNTmux', '#nZEDbPRE']]) : ['#PreNNTmux' => null]; $this->joinChannels($channels); 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. */ protected function processChannelMessages(): void { if (preg_match( '/^(NEW|UPD|NUK): \[DT: (?P