示例#1
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);
 }