Added posix-fifo to deliver alerts to the IRC-bot

This commit is contained in:
f0o
2015-03-15 13:00:25 +00:00
parent fe06a0a443
commit e4b5b48f61
2 changed files with 11 additions and 4 deletions

View File

@@ -21,4 +21,11 @@
* @subpackage Alerts
*/
return file_put_contents($config['install_dir']."/.ircbot.alert", json_encode($obj)."\n", FILE_APPEND);
$f = $config['install_dir']."/.ircbot.alert";
$f = fopen($f,"w+");
$f = fwrite($f,json_encode($obj)."\n");
if( $f === false ) {
return false;
} else {
return true;
}