public function hasPermission(Dog_Server $server, $channel, Dog_User $user) { $c = $this->priv; switch ($this->scope) { case 'u': case 'g': case 's': return Dog_PrivServer::hasPermChar($server, $user, $c); case 'c': return $channel === false ? false : Dog_PrivChannel::hasPermChar($channel, $user, $c); default: return Dog_Log::critical('Invalid scope in hasPermission()!'); } }