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); }
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; }
public static function getPeak(Dog_Channel $channel) { $cid = $channel->getID(); if (false !== ($peak = GDO::table(__CLASS__)->getRow($cid))) { return $peak; } return self::createPeak($cid); }
public function removeChannel(Dog_Channel $channel) { unset($this->channels[$channel->getID()]); }
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; }
/** * @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()); }
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); } } } }
public static function flushPermcache(Dog_Channel $channel, Dog_User $user) { $user->unsetVar("dcp_{$channel->getID()}"); }