From e0e41200eae59e81ad98cc7c2656fb5f9636554b Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Wed, 18 Mar 2015 11:37:52 +0000 Subject: [PATCH] Do not hide banned clients when bans are disabled --- Plugin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugin.php b/Plugin.php index cf99737..097f8d6 100644 --- a/Plugin.php +++ b/Plugin.php @@ -28,6 +28,7 @@ use Mibew\EventDispatcher\EventDispatcher; use Mibew\EventDispatcher\Events; use Mibew\Plugin\AbstractPlugin; use Mibew\Plugin\PluginInterface; +use Mibew\Settings; /** * The main plugin's file definition. @@ -52,6 +53,11 @@ class Plugin extends AbstractPlugin implements PluginInterface */ public function run() { + if (!Settings::get('enableban')) { + // Bans are disabled. The plugin should do nothing in this case. + return; + } + $dispatcher = EventDispatcher::getInstance(); $dispatcher->attachListener(Events::USERS_UPDATE_THREADS_ALTER, $this, 'alterThreads'); $dispatcher->attachListener(Events::USERS_UPDATE_VISITORS_ALTER, $this, 'alterVisitors');