Beispiel #1
0
 public function __toString()
 {
     $uid = $this->user ? $this->user->getID() : '?';
     $cid = $this->channel ? $this->channel->getID() : '?';
     $sid = $this->server ? $this->server->getID() : '?';
     return sprintf('SCOPE(U:%s,C:%s,S:%s)', $uid, $cid, $sid);
 }
Beispiel #2
0
 public static function createChannelRecord(Dog_Channel $channel)
 {
     $row = new self(array('dqj_cid' => $channel->getID(), 'dqj_sid' => $channel->getVar('chan_sid'), 'dqj_uid' => 0, 'dqj_duration' => 9999.999900000001, 'dqj_date_quit' => str_repeat('0', 14), 'dqj_date_join' => str_repeat('0', 14), 'dqj_options' => 0));
     if (false === $row->replace()) {
         return false;
     }
     return $row;
 }
Beispiel #3
0
 public static function getPeak(Dog_Channel $channel)
 {
     $cid = $channel->getID();
     if (false !== ($peak = GDO::table(__CLASS__)->getRow($cid))) {
         return $peak;
     }
     return self::createPeak($cid);
 }
Beispiel #4
0
 public function removeChannel(Dog_Channel $channel)
 {
     unset($this->channels[$channel->getID()]);
 }
Beispiel #5
0
 private static function stopTheWatch(Dog_User $user, Dog_Channel $channel)
 {
     $uid = $user->getID();
     $cid = $channel->getID();
     return isset(self::$JOIN[$cid][$uid]) ? self::$JOIN[$cid][$uid] : false;
 }
Beispiel #6
0
 /**
  * @param Dog_Server $server
  * @param Dog_Channel $channel
  * @return Dog_GreetMsg
  */
 public static function getGreetMsg(Dog_Server $server, Dog_Channel $channel)
 {
     return GDO::table(__CLASS__)->getRow($channel->getID());
 }
Beispiel #7
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);
             }
         }
     }
 }
Beispiel #8
0
 public static function flushPermcache(Dog_Channel $channel, Dog_User $user)
 {
     $user->unsetVar("dcp_{$channel->getID()}");
 }