diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index d592ac9..28f3278 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -59,8 +59,7 @@ def prerun(): # If not piping the replies into pipe, let'sprint to IRC now if not comrun.is_pipe_command: - for say_message in comrun._say: - sb.osd(say_message) + comrun.osd(comrun._say) # Pipe text back to bot for next piped command else: for say_message in comrun._say: @@ -128,6 +127,11 @@ class ComRun(): def say(self, message): self._say.append(message) + def osd(self, messages, recipients=None, text_method='PRIVMSG', max_messages=-1): + if not recipients: + recipients = self.trigger.sender + sb.osd(messages, recipients, text_method, max_messages=-1) + @property def is_real_command(self): return sb.commands.is_real_command(self.command)