diff --git a/edmond/plugins/capture.py b/edmond/plugins/capture.py index 87fe484..ebe7948 100644 --- a/edmond/plugins/capture.py +++ b/edmond/plugins/capture.py @@ -15,6 +15,7 @@ class CapturePlugin(Plugin): def __init__(self, bot): super().__init__(bot) self.priority = -8 + self.release_in_channel = "" self.current_thing = None def on_pubmsg(self, event): @@ -26,10 +27,14 @@ class CapturePlugin(Plugin): return False if proc(self.config["rate"]): - self.release_thing(event.target) - return True + self.release_in_channel = event.target return False + def on_ping(self, event): + if self.release_in_channel: + self.release_thing(self.release_in_channel) + self.release_in_channel = "" + def release_thing(self, target): self.current_thing = random.choice(self.config["things"]) self.bot.say(target, f"(>O_O)> ~~{self.current_thing}")