Improve ZNC error message detection

pull/1/head
Mark Veidemanis 5 years ago
parent b97ebe43ab
commit 5777ef0cfe

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

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

Loading…
Cancel
Save