aboutsummaryrefslogtreecommitdiff
path: root/modules/throttle.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/throttle.py')
-rw-r--r--modules/throttle.py17
1 files changed, 0 insertions, 17 deletions
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)