* @package be.bastelstu.chat * @subpackage system.chat.command.commands */ class GunbanCommand extends UnmuteCommand { /** * @see \chat\system\command\commands\UnmuteCommand::executeAction() */ public function executeAction() { $room = new \chat\data\room\Room(null, array('roomID' => null)); if ($suspension = suspension\Suspension::getSuspensionByUserRoomAndType($this->user, $room, suspension\Suspension::TYPE_BAN)) { $action = new suspension\SuspensionAction(array($suspension), 'revoke', array( 'revoker' => WCF::getUser()->userID )); $action->executeAction(); } else { throw new \wcf\system\exception\UserInputException('text', WCF::getLanguage()->get('wcf.chat.suspension.notExists')); } } }