Escape the nick when forming a regexp

This commit is contained in:
Alexei Sorokin 2017-06-18 12:15:29 +03:00
부모 30e84cc7e6
커밋 47aab1356e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@ -215,7 +215,7 @@ class Hptoad:
futures = []
# Has to be redone with the current bot nick.
call_regexp = re.compile("^%s[:,]" % self.bot_nick)
call_regexp = re.compile("^%s[:,]" % re.escape(self.bot_nick))
for plugin in self.plugins.values():
future = asyncio.async(plugin.call_chat_message(body, nick,