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; }