diff --git a/file/lib/system/command/commands/UnbanCommand.class.php b/file/lib/system/command/commands/UnbanCommand.class.php new file mode 100644 index 0000000..ee4e5eb --- /dev/null +++ b/file/lib/system/command/commands/UnbanCommand.class.php @@ -0,0 +1,30 @@ + + * @package be.bastelstu.chat + * @subpackage system.chat.command.commands + */ +class UnbanCommand extends UnmuteCommand { + /** + * @see \chat\system\command\commands\UnmuteCommand::executeAction() + */ + public function executeAction() { + if ($suspension = suspension\Suspension::getSuspensionByUserRoomAndType($this->user, $this->room, suspension\Suspension::TYPE_BAN)) { + $action = new suspension\SuspensionAction(array($suspension), 'delete'); + $action->executeAction(); + } + else { + throw new \wcf\system\exception\UserInputException('text', WCF::getLanguage()->get('wcf.chat.suspension.notExists')); + } + } +} diff --git a/language/de.xml b/language/de.xml index 1d36e58..54fc996 100644 --- a/language/de.xml +++ b/language/de.xml @@ -117,6 +117,7 @@ +