#  начинаю что-то делать
vit01 (mira, 1) → All  –  13:01:18 2014-10-18

Почистил блэклист и базу на ноде от плохих сообщений.

маленький скриптик для автоматизации процесса:

function getecho($echo) {
$echofile=explode("\n", file_get_contents("echo/".$echo));
array_pop($echofile);
return $echofile;
}
$blacklist=explode("\n", file_get_contents("./blacklist.txt"));
array_pop($blacklist);
$echolist=scandir("echo/");
$echos=[];
foreach($echolist as $echofile) {
if($echofile!="." && $echofile!="..") {
$echos[]=$echofile;
}
}
foreach($echos as $echo) {
$msgids=getecho($echo);
foreach($blacklist as $blackmsg) {
$key=array_search($blackmsg, $msgids);
if($key!=false) {
unset($msgids[$key]);
echo "deleted msgid ".$blackmsg." from echo ".$echo."\n";
}
}
$msgids=array_values($msgids);
echo "resaving echo ".$echo." to base\n";
file_put_contents("echo/".$echo, implode("\n", $msgids)."\n");
}
foreach($blacklist as $blackmsg) {
if(file_exists("msg/".$blackmsg)) {
echo "removing file ".$blackmsg." from base\n";
unlink("msg/".$blackmsg);
}
}

Powered by iii-php v0.11