From 31367b2b5d81a9f53a208312cbc0fee8efe01ff5 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 9 Feb 2019 10:56:06 +0000 Subject: Eat youtube URLs on LOW priority, switch auto-title to MONITOR priority --- modules/title.py | 3 ++- modules/youtube.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/title.py b/modules/title.py index a5a302ee..99dae34f 100644 --- a/modules/title.py +++ b/modules/title.py @@ -19,7 +19,8 @@ class Module(ModuleManager.BaseModule): else: return None - @utils.hook("received.message.channel") + @utils.hook("received.message.channel", + priority=EventManager.PRIORITY_MONITOR) def channel_message(self, event): match = re.search(REGEX_URL, event["message"]) if match and event["channel"].get_setting("auto-title", False): diff --git a/modules/youtube.py b/modules/youtube.py index b9f2373a..3ada14d3 100644 --- a/modules/youtube.py +++ b/modules/youtube.py @@ -124,7 +124,8 @@ class Module(ModuleManager.BaseModule): else: event["stderr"].write("No search phrase provided") - @utils.hook("received.message.channel") + @utils.hook("received.message.channel", + priority=EventManager.PRIORITY_LOW) def channel_message(self, event): match = re.search(REGEX_YOUTUBE, event["message"]) if match and event["channel"].get_setting("auto-youtube", False): @@ -134,3 +135,4 @@ class Module(ModuleManager.BaseModule): self.events.on("send.stdout").call(target=event["channel"], message=video_details, module_name="Youtube", server=event["server"]) + event.eat() -- cgit v1.3.1-10-gc9f91