idleirc/config.php
2020-12-09 23:06:16 -08:00

50 lines
1.3 KiB
PHP
Executable File

<?php
///////
// IdleIRC - 2020
// (C) Chris Dorman, GPLv3
// https://github.com/Pentium44/idleirc
///////
$title = "IdleIRC"; // Chat title
$desc = "IdleIRC, a simple PHP based IRC client & bouncer."; // Chat description
$server = "cddo.cf"; // IRC server connected to (for information display panel and client)
$port = "1337"; // IRC server port (for information display panel)
$server_msgcount = "80"; // Number of messages to leave at the end of the server database
$default_channel = "#theroot"; // Default channel to push users into
$logfile = "irclog.txt"; // Log instances for each bouncer
//$maxloglength = "10"; // Max line length for flatfile IRC logger ~ bouncer.
///// WEBCLIENT LAYOUT /////
$ipcolor = "#00FF00";
///// NO TOUCHY SECTION /////
$version = "1.2.1"; // CWChat version
function doLog($string) {
file_put_contents($GLOBALS['logfile'], $string . "\r\n", FILE_APPEND);
}
/*function check_log_size($filename) {
$linecount = 0;
$handle = fopen($filename, "r");
// Go count log size
while(!feof($handle)){
if (fgets($handle) !== false) {
$linecount++;
}
}
fclose($handle);
if($linecount > $GLOBALS['maxloglength']) {
$to_remove = ($linecount-$GLOBALS['maxloglength']);
$handle = file($filename);
array_splice($handle, 0, $to_remove);
unlink($filename);
file_put_contents($filename, $handle);
}
} */
?>