megahal library crashes if the text ends with ' for some reason, so work around it
This commit is contained in:
parent
1988662c0a
commit
827d1b2c86
|
@ -57,6 +57,9 @@ class MegaHAL(Module):
|
|||
reply = ""
|
||||
append_nick = False
|
||||
|
||||
if line[-1] == '\'':
|
||||
line = line[:-1]
|
||||
|
||||
if re.search(connection.get_nickname(), line, re.IGNORECASE) is not None:
|
||||
addressed_pattern = '^' + connection.get_nickname() + '[:,]\s+'
|
||||
addressed_re = re.compile(addressed_pattern)
|
||||
|
|
Loading…
Reference in New Issue