Added capability to unblock addresses without a restart

This commit is contained in:
Dylan K. Taylor
2017-08-14 14:12:06 +01:00
parent 0c798222a4
commit ae3a8a5493
5 changed files with 17 additions and 1 deletions

View File

@ -50,6 +50,7 @@ class PardonIpCommand extends VanillaCommand{
if(preg_match("/^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$/", $args[0])){
$sender->getServer()->getIPBans()->remove($args[0]);
$sender->getServer()->getNetwork()->unblockAddress($args[0]);
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.unbanip.success", [$args[0]]));
}else{
$sender->sendMessage(new TranslationContainer("commands.unbanip.invalid"));