bot: replace \r and \n before sending message

This commit is contained in:
dece 2021-12-02 11:35:02 +01:00
parent 56656dca98
commit 6b9430aabb

View file

@ -149,6 +149,7 @@ class Bot(irc.client.SimpleIRCClient, Logger):
def say(self, target, message):
"""Send message to target after a slight delay."""
message = message.replace("\n", " ").replace("\r", " ")
time.sleep(self.config["speak_delay"])
self.log_d(f"Sending to {target}: {message}")
try: