From 638eee0d685c06d258cb55287204ca97bca7c344 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 10 Dec 2019 05:27:35 +0000 Subject: move core modules to src/core_modules, make them uneffected by white/black list --- modules/throttle.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 modules/throttle.py (limited to 'modules/throttle.py') diff --git a/modules/throttle.py b/modules/throttle.py deleted file mode 100644 index e204cc34..00000000 --- a/modules/throttle.py +++ /dev/null @@ -1,17 +0,0 @@ -from src import ModuleManager, utils - -def _parse(value): - lines, _, seconds = value.partition(":") - if lines.isdigit() and seconds.isdigit(): - return [int(lines), int(seconds)] - return None - -@utils.export("serverset", utils.FunctionSetting(_parse, "throttle", - "Configure lines:seconds throttle for the current server", example="4:2")) -class Module(ModuleManager.BaseModule): - @utils.hook("received.001") - def connect(self, event): - throttle = event["server"].get_setting("throttle", None) - if throttle: - lines, seconds = throttle - event["server"].socket.set_throttle(lines, seconds) -- cgit v1.3.1-10-gc9f91