private function openDatabase($channel) { $channel = strtolower($channel); if (isset($this->quotesCache[$channel])) { return $this->quotesCache[$channel]; } else { $cqDB = new ini("modules/quotes_ini/quotes_database/" . $channel . ".txt"); if ($cqDB->getError()) { return false; } $this->quotesCache[$channel] = $cqDB; return $cqDB; } }
private function loadAds() { $ads = new ini("./modules/default/ads.ini"); if ($ads->getError()) { return; } $sections = $ads->getSections(); foreach ($sections as $ad) { $int = $ads->getIniVal($ad, "int"); $channel = $ads->getIniVal($ad, "chan"); $msg = $ads->getIniVal($ad, "msg"); $argArray = array('msg' => $msg, 'channel' => $channel); $this->timerClass->addTimer($ad, $this, "misc_adTimer", $argArray, $int); } $this->ads = $ads; }
public function init() { unset($this->badWords); $this->badWords = array(); $badWords = new ini("modules/bad_words/bad_words.ini"); if ($badWords->getError()) { return; } $channels = $badWords->getSections(); if ($channels === false) { return; } foreach ($channels as $channel) { $channel = irc::myStrToLower($channel); $bw = $badWords->getSection($channel); if ($bw == false || !is_array($bw)) { continue; } foreach ($bw as $badword => $blah) { $this->badWords[$channel][$badword] = true; } } }
public function getSlaps() { $slaps = new ini( "./modules/slap/slaps.ini" ); if( $slaps->getError( ) ) { $this->ircClass->notice( $nick, "Error while getting slaps." ); return; } $sections = $slaps->getSections( ); foreach( $sections as $slap ) { $msg = $slaps->getIniVal( $slap, "msg" ); $status = $slaps->getIniVal( $slap, "status" ); $argArray = array('msg' => $msg, 'status' => $status); } $this->slaps = $slaps; }
private function loadConfig() { $httpConfig = new ini("modules/httpdext/http.ini"); if ($httpConfig->getError()) { return false; } $this->port = intval($httpConfig->getIniVal("config", "port")); if ($this->port == 0) { return false; } $this->httpConfig = $httpConfig; return true; }
private function loadConfig() { $httpConfig = new ini("modules/httpd/http.ini"); if ($httpConfig->getError()) { return false; } $this->port = intval($httpConfig->getIniVal("config", "port")); if ($this->port == 0) { return false; } $root = $httpConfig->getIniVal("config", "root"); if ($root === false) { $root = ""; } $this->root = $root; $defaultIndex = $httpConfig->getIniVal("config", "defaultindex"); if ($defaultIndex === false) { $defaultIndex = "index.html"; } $this->defaultIndex = $defaultIndex; $this->httpConfig = $httpConfig; return true; }