pngbot.py: convert to lower case when comparing channel names.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-02 21:54:02 +01:00
parent 5f4aa470b9
commit b94d3afdb5

View File

@ -102,8 +102,8 @@ def main(argv0, ircServerHname, ircServerPort="6667", ircClientNick="pngbot", ir
_IrcBot.sendline("JOIN", ircClientChannel) _IrcBot.sendline("JOIN", ircClientChannel)
elif ircServerMessage[1] == "PING": elif ircServerMessage[1] == "PING":
_IrcBot.sendline("PONG", ircServerMessage[2]) _IrcBot.sendline("PONG", ircServerMessage[2])
elif ircServerMessage[1] == "PRIVMSG" \ elif ircServerMessage[1] == "PRIVMSG" \
and ircServerMessage[2] == ircClientChannel \ and ircServerMessage[2].lower() == ircClientChannel.lower() \
and ircServerMessage[3].startswith("!pngbot "): and ircServerMessage[3].startswith("!pngbot "):
asciiUrl = ircServerMessage[3].split(" ")[1] asciiUrl = ircServerMessage[3].split(" ")[1]
asciiTmpFilePath = "tmp.txt"; imgTmpFilePath = "tmp.png"; asciiTmpFilePath = "tmp.txt"; imgTmpFilePath = "tmp.png";