예제 #1
0
 public function getPower()
 {
     return Dog_IRCPriv::charToBit($this->priv);
 }
예제 #2
0
 public static function hasPermChar(Dog_Channel $channel, Dog_User $user, $char, $needlogin = true)
 {
     return self::hasPermBits($channel, $user, Dog_IRCPriv::charToBit($char), $needlogin);
 }
예제 #3
0
 public static function hasPermChar(Dog_Server $server, Dog_User $user, $char)
 {
     return self::hasPermBits($server, $user, Dog_IRCPriv::charToBit($char));
 }
예제 #4
0
파일: Dog.php 프로젝트: sinfocol/gwf3
 public static function hasPermission(Dog_Server $serv, $chan = false, Dog_User $user, $priv, $abc = NULL, $needlogin = true)
 {
     switch ($abc) {
         case 'a':
             if ($chan !== false) {
                 return false;
             }
             # works not in channel vvv fallthrough
         # works not in channel vvv fallthrough
         case 'b':
             $chan = false;
             break;
             # need server perms
         # need server perms
         case 'c':
             if ($chan === false) {
                 return false;
             }
             # only channel
     }
     $priv = Dog_IRCPriv::charToBit($priv);
     return $chan === false ? Dog_PrivServer::hasPermBits($serv, $user, $priv, $needlogin) : Dog_PrivChannel::hasPermBits($chan, $user, $priv, $needlogin);
 }