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/strip_otr.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 modules/strip_otr.py (limited to 'modules/strip_otr.py') diff --git a/modules/strip_otr.py b/modules/strip_otr.py deleted file mode 100644 index bdb273a5..00000000 --- a/modules/strip_otr.py +++ /dev/null @@ -1,15 +0,0 @@ -from src import EventManager, ModuleManager, utils - -# Strip magic whitespace string from the end of messages. -# OTR uses this string to advertise, over plaintext, that the sending user -# supports OTR. - -MAGIC = " \t \t\t\t\t \t \t \t \t\t \t \t" - -class Module(ModuleManager.BaseModule): - @utils.hook("raw.received.privmsg") - @utils.kwarg("priority", EventManager.PRIORITY_HIGH) - def on_message(self, event): - message = event["line"].args.get(1) - if message.endswith(MAGIC): - event["line"].args[1] = message.rsplit(MAGIC, 1)[0] -- cgit v1.3.1-10-gc9f91