From de0b031857cc6745cac972147fb3bf46d293f5ef Mon Sep 17 00:00:00 2001 From: Darko Date: Mon, 31 Mar 2014 12:33:12 +0200 Subject: [PATCH] Updated IRCScraper and prehash.php --- bin/monitor.php | 2 +- lib/IRCScraper.php | 9 ++-- lib/IRCScraper/settings_example.php | 80 ++++++++++++++++++++++------- lib/prehash.php | 2 +- 4 files changed, 70 insertions(+), 23 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index 9ac10b55e..d9cf93b64 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -9,7 +9,7 @@ require_once(dirname(__FILE__)."/../lib/showsleep.php"); require_once(dirname(__FILE__)."/../lib/functions.php"); -$version="0.3r1039"; +$version="0.3r1040"; $db = new DB(); $functions = new Functions(); diff --git a/lib/IRCScraper.php b/lib/IRCScraper.php index c78d674ec..f44725f40 100644 --- a/lib/IRCScraper.php +++ b/lib/IRCScraper.php @@ -205,9 +205,12 @@ class IRCScraper echo '[' . date('r') . - '] [Scraping of IRC channels for ' . - $this->serverType . - ' started.]' . + '] [Scraping of IRC channels for (' . + $server . + $port . + ') (' . + $nickname . + ') started.]' . PHP_EOL; } diff --git a/lib/IRCScraper/settings_example.php b/lib/IRCScraper/settings_example.php index a7a9ee9f8..dd95bbdc8 100644 --- a/lib/IRCScraper/settings_example.php +++ b/lib/IRCScraper/settings_example.php @@ -1,24 +1,68 @@ = 7) { + $username = substr($username, 0, 6); + $current = 6; + } + for ($i = 0; $i < (9 - $current); $i++) { + $username .= rand(0,9); + } + return $username; +} + diff --git a/lib/prehash.php b/lib/prehash.php index e964d3b0b..3006346d1 100644 --- a/lib/prehash.php +++ b/lib/prehash.php @@ -33,7 +33,7 @@ Class PreHash $db = new DB(); $f = new Functions(); $newnames = 0; - $newestrel = $db->queryOneRow("SELECT adddate, ID FROM prehash ORDER BY adddate DESC LIMIT 1"); + $newestrel = $db->queryOneRow('SELECT adddate, ID FROM prehash WHERE source NOT like "#%" ORDER BY adddate DESC LIMIT 1'); if (strtotime($newestrel["adddate"]) < time()-1200 || is_null($newestrel['adddate'])) { if ($this->echooutput)