aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-09 10:56:06 +0000
committerGravatar jesopo2019-02-09 10:56:06 +0000
commit31367b2b5d81a9f53a208312cbc0fee8efe01ff5 (patch)
treef425357bb432b35c51aa24c17e636d3ad3ce17f7 /modules
parentActually return title text, not html Tag object (title.py) (diff)
signature
Eat youtube URLs on LOW priority, switch auto-title to MONITOR priority
Diffstat (limited to 'modules')
-rw-r--r--modules/title.py3
-rw-r--r--modules/youtube.py4
2 files changed, 5 insertions, 2 deletions
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()