50 lines
1.4 KiB
PHP
Executable File
50 lines
1.4 KiB
PHP
Executable File
<?php
|
|
///////
|
|
// IdleIRC - 2020
|
|
// (C) Chris Dorman, GPLv3
|
|
// https://github.com/Pentium44/idleirc
|
|
///////
|
|
|
|
$title = "IdleIRC"; // Main IdleIRC title
|
|
$desc = "IdleIRC is a simple web based IRC client & bouncer service."; // IdleIRC description
|
|
$server = "cddo.cf"; // IRC server connected to (for information display panel and client)
|
|
$port = "1337"; // IRC server port (for information display panel and client)
|
|
$default_channel = "#theroot"; // Default channel to push users into
|
|
$logfile = "irclog.txt"; // Log instances for IdleIRC
|
|
$allowMultiServer = "true"; // [true/false] Allow users to set other IRC servers for bouncer connect
|
|
//$maxloglength = "10"; // Max line length for flatfile IRC logger ~ bouncer. This is a WIP...
|
|
|
|
///// WEBCLIENT LAYOUT /////
|
|
$ipcolor = "#00FF00";
|
|
|
|
///// NO TOUCHY SECTION /////
|
|
$version = "1.3.1"; // IdleIRC 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);
|
|
}
|
|
} */
|
|
|
|
?>
|