From 36fff72a6106068af07f646d00dd5dc078a2e064 Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Thu, 9 May 2019 01:04:41 -0400 Subject: [PATCH] split %\n --- ASCII/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ASCII/plugin.py b/ASCII/plugin.py index 93067fb..af1e37c 100644 --- a/ASCII/plugin.py +++ b/ASCII/plugin.py @@ -1087,7 +1087,7 @@ class ASCII(callbacks.Plugin): delay = self.registryValue('delay', msg.args[0]) data = open("{0}/fortune.txt".format(os.path.dirname(os.path.abspath(__file__)))) text = data.read() - reply = re.split('^%', text) + reply = text.split('%\n') fortune = random.randrange(0, len(reply)) for line in reply[fortune].splitlines(): if not line.strip() and not self.stopped[msg.args[0]]: