Ejemplo n.º 1
0
 public function getValue()
 {
     $key = $this->name;
     $def = $this->default;
     $sid = Dog::getServer()->getID();
     $c = Dog::getChannel();
     if ($this->module !== NULL) {
         $mod = $this->module;
         switch ($this->scope) {
             case 'g':
                 return Dog_Conf_Mod::getConf($mod, $key, $def);
             case 's':
                 return Dog_Conf_Mod_Serv::getConf($mod, $sid, $key, $def);
             case 'c':
                 return $c === false ? $def : Dog_Conf_Mod_Chan::getConf($mod, $c->getID(), $key, $def);
             case 'u':
                 return Dog_Conf_Mod_User::getConf($mod, Dog::getUID(), $key, $def);
         }
     } elseif ($this->plugin !== NULL) {
         $plg = $this->plugin;
         switch ($this->scope) {
             case 'g':
                 return Dog_Conf_Plug::getConf($plg, $key, $def);
             case 's':
                 return Dog_Conf_Plug_Serv::getConf($plg, $sid, $key, $def);
             case 'c':
                 return $c === false ? $def : Dog_Conf_Plug_Chan::getConf($plg, $c->getID(), $key, $def);
             case 'u':
                 return Dog_Conf_Plug_User::getConf($plg, Dog::getUID(), $key, $def);
         }
     }
     return $def;
 }
Ejemplo n.º 2
0
 private function onBoardServerChannelTimer(array $entries, Dog_Forum $board, Dog_Server $server, Dog_Channel $channel)
 {
     if ('' === ($boardstring = Dog_Conf_Mod_Chan::getConf($this->getName(), $channel->getID(), 'boards', ''))) {
         return;
     }
     $boardstr = explode(';', $boardstring);
     foreach ($boardstr as $boardst) {
         $abbo = new Dog_ForumAbbo($boardst);
         foreach ($entries as $entry) {
             $entry instanceof Dog_ForumEntry;
             if ($abbo->matches($board, $entry)) {
                 $this->sendAbbo($board, $channel, $entry);
             }
         }
     }
 }