mirror of
https://github.com/Mibew/real-ban-plugin.git
synced 2025-01-22 09:30:32 +03:00
Do not hide banned clients when bans are disabled
This commit is contained in:
parent
6b3bef008f
commit
e0e41200ea
@ -28,6 +28,7 @@ use Mibew\EventDispatcher\EventDispatcher;
|
|||||||
use Mibew\EventDispatcher\Events;
|
use Mibew\EventDispatcher\Events;
|
||||||
use Mibew\Plugin\AbstractPlugin;
|
use Mibew\Plugin\AbstractPlugin;
|
||||||
use Mibew\Plugin\PluginInterface;
|
use Mibew\Plugin\PluginInterface;
|
||||||
|
use Mibew\Settings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main plugin's file definition.
|
* The main plugin's file definition.
|
||||||
@ -52,6 +53,11 @@ class Plugin extends AbstractPlugin implements PluginInterface
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
if (!Settings::get('enableban')) {
|
||||||
|
// Bans are disabled. The plugin should do nothing in this case.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$dispatcher = EventDispatcher::getInstance();
|
$dispatcher = EventDispatcher::getInstance();
|
||||||
$dispatcher->attachListener(Events::USERS_UPDATE_THREADS_ALTER, $this, 'alterThreads');
|
$dispatcher->attachListener(Events::USERS_UPDATE_THREADS_ALTER, $this, 'alterThreads');
|
||||||
$dispatcher->attachListener(Events::USERS_UPDATE_VISITORS_ALTER, $this, 'alterVisitors');
|
$dispatcher->attachListener(Events::USERS_UPDATE_VISITORS_ALTER, $this, 'alterVisitors');
|
||||||
|
Loading…
Reference in New Issue
Block a user