From a0313e14d953998c11c075f349a73b5e15be8813 Mon Sep 17 00:00:00 2001 From: Fulgen301 Date: Thu, 8 Dec 2016 16:03:54 +0100 Subject: Bugs fixed. --- pycrctrl.pyp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pycrctrl.pyp') diff --git a/pycrctrl.pyp b/pycrctrl.pyp index fe76d4b..1f650c7 100644 --- a/pycrctrl.pyp +++ b/pycrctrl.pyp @@ -271,8 +271,8 @@ class PyCRCtrl(object): if output[0] == ">": output = output[1:] - if output.find(self.prefix) != -1 and output.find("<{}>".format(self.irc.nick)) == -1: - part = output[output.find(self.prefix)+len(self.prefix):].split(" ",1) + if output.find(self.getConfigEntry("prefix")) != -1 and output.find("<{}>".format(self.irc.nick)) == -1: + part = output[output.find(self.getConfigEntry("prefix"))+len(self.getConfigEntry("prefix")):].split(" ",1) found = False x = None if len(part) > 0: @@ -301,11 +301,10 @@ class PyCRCtrl(object): except (UnicodeDecodeError, UnicodeEncodeError): pass - # RegExps are from CRSM ((c) DerTod) if self.irc: if output.find("<" + self.irc.nick + ">") == -1: if bool(re.match(r"^<.*>", output) and output.find("[IRC]") == -1) and \ - bool(output.find(self.prefix) == -1): + bool(output.find(self.getConfigEntry("prefix")) == -1): self.irc.reply("[Clonk]{}".format(output), to=self.getConfigEntry("channels")["ingame"]) elif bool(re.match(self.getConfigEntry("RegExps")["joinExp"], output)) or \ -- cgit v1.2.3-54-g00ecf