コード例 #1
0
 protected function checkPerm(Session $session, &$msg = null)
 {
     if ($session->isModerator() or $session->isDonator()) {
         return true;
     }
     $msg = $session->translate(Phrases::CMD_ERR_NO_PERM);
     return false;
 }
コード例 #2
0
 protected function checkPerm(Session $session, &$msg = "")
 {
     if (!$session->isModerator()) {
         $msg = "This command is only for moderators.";
         return false;
     }
     return true;
 }
コード例 #3
0
 protected function checkPerm(Session $session, &$msg = null)
 {
     if (!$session->isModerator() and !$session->isDonator()) {
         $msg = $session->translate(Phrases::CMD_ERR_NO_PERM_DONATE);
         return false;
     }
     return true;
 }
コード例 #4
0
 protected function run(array $args, Session $sender)
 {
     $em = Phrases::VAR_em;
     $em2 = Phrases::VAR_em2;
     return implode("\n", array_filter(["Usage:", ($sender->isDonator() or $sender->isModerator()) ? "{$em}/tc <team name>:{$em2} Create a new team" : "", "{$em}/tj <team name>:{$em2} Join an opened team or accept the invitation into the team.", "{$em}/tq:{$em2} Quit a team.", "{$em}/tinv <player full name>:{$em2} Invite a player into your team.", "{$em}/tprom <player full name>:{$em2} Promote a member in your team.", "{$em}/tdem <player full name>:{$em2} Demote a member in your team.", "{$em}/tdesc [new description]:{$em2} View or edit the team description.", "{$em}/trule [new description]:{$em2} View or edit the team rules.", "{$em}/topen:{$em2} Open your team to let everyone join it.", "{$em}/tclose:{$em2} Set your team as invite-only.", "{$em}/ti [team name]:{$em2} Show team information of the specified team or your team.", "{$em}/tm [team name]:{$em2} Show members in the specified team or your team", "{$em}/tl:{$em2} List the best 5 teams."]));
 }
コード例 #5
0
 protected function checkPerm(Session $session, &$msg = null)
 {
     return $session->isModerator();
 }
コード例 #6
0
 protected function hasPermission(Session $session)
 {
     return $session->isModerator();
 }