Improve ZNC error message detection

This commit is contained in:
Mark Veidemanis 2019-10-13 12:38:44 +01:00
parent b97ebe43ab
commit 5777ef0cfe
2 changed files with 8 additions and 4 deletions

View File

@ -68,10 +68,9 @@ class IRCRelay(IRCClient):
def privmsg(self, user, channel, msg):
nick, ident, host = self.parsen(user)
if "does not exist" in msg or "doesn't exist" in msg:
error("ZNC issue:", msg)
if "Unable to load" in msg:
error("ZNC issue:", msg)
for i in main.ZNCErrors:
if i in msg:
error("ZNC issue:", msg)
if nick[0] == main.config["Tweaks"]["ZNC"]["Prefix"]:
nick = nick[1:]
if nick in self.relayCommands.keys():

View File

@ -6,6 +6,11 @@ from os import urandom
from utils.logging.log import *
ZNCErrors = ["Error:",
"Unable to load",
"does not exist",
"doesn't exist"]
configPath = "conf/"
certPath = "cert/"