config.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. ///////
  3. // IdleIRC - 2020
  4. // (C) Chris Dorman, GPLv3
  5. // https://github.com/Pentium44/idleirc
  6. ///////
  7. $title = "IdleIRC"; // Main IdleIRC title
  8. $pagetitle = "IdleIRC"; // Main IdleIRC UI page title.
  9. $desc = "IdleIRC is a simple web based IRC client & bouncer service"; // IdleIRC description
  10. $server = "cddo.cf"; // IRC server connected to (for information display panel and client)
  11. $port = "1337"; // IRC server port (for information display panel and client)
  12. $default_channel = "#theroot"; // Default channel to push users into
  13. $logfile = "irclog.txt"; // Log instances for IdleIRC
  14. $allowMultiServer = "true"; // [true/false] Allow users to set other IRC servers for bouncer connect
  15. $ui_theme = "dark"; // [light|dark] Set default UI CSS stylesheet.
  16. //$maxloglength = "10"; // Max line length for flatfile IRC logger ~ bouncer. This is a WIP...
  17. ///// WEBCLIENT LAYOUT /////
  18. $ipcolor = "#00FF00";
  19. ///// NO TOUCH /////
  20. // Include software version in another php file for the sake of git pull
  21. include_once("version.php");
  22. function doLog($string) {
  23. file_put_contents($GLOBALS['logfile'], $string . "\r\n", FILE_APPEND);
  24. }
  25. /*function check_log_size($filename) {
  26. $linecount = 0;
  27. $handle = fopen($filename, "r");
  28. // Go count log size
  29. while(!feof($handle)){
  30. if (fgets($handle) !== false) {
  31. $linecount++;
  32. }
  33. }
  34. fclose($handle);
  35. if($linecount > $GLOBALS['maxloglength']) {
  36. $to_remove = ($linecount-$GLOBALS['maxloglength']);
  37. $handle = file($filename);
  38. array_splice($handle, 0, $to_remove);
  39. unlink($filename);
  40. file_put_contents($filename, $handle);
  41. }
  42. } */
  43. ?>