From d0e445e444485375a05bc489c121167933e003a8 Mon Sep 17 00:00:00 2001 From: discomrade Date: Thu, 14 Oct 2021 07:04:26 +0000 Subject: [PATCH] Clean up duplicate code --- inc/bans.php | 6 +++--- inc/functions.php | 21 ++++----------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/inc/bans.php b/inc/bans.php index 81e38006..e629ddae 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -1,8 +1,8 @@ 2) { - return implode(':', array_map(function ($b) { - return sprintf("%04x", $b); - }, $bytes)); - } - return $ip; + return strrev(implode(".", str_split(str_replace(':', '', IP::inet_expand($ip))))); } function wordfilters(&$body) {