Deauth bot when disconnected and lowercase user

This commit is contained in:
Mark Veidemanis 2020-10-31 00:12:06 +00:00
parent 1fec14d759
commit f3dd102096
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class IRCRelay(IRCClient):
if user == None:
self.user = main.config["Relay"]["User"]
else:
self.user = user
self.user = user.lower()
password = main.config["Relay"]["Password"]
self.nickname = "relay"
self.realname = "relay"
@ -167,6 +167,7 @@ class IRCBot(IRCClient):
line = line.decode("utf-8", "replace")
line = lowDequote(line)
trace(self.net, self.num, line)
try:
prefix, command, params = parsemsg(line)
if command in numeric_to_symbolic:
@ -235,6 +236,7 @@ class IRCBot(IRCClient):
if "Disconnected from IRC" in cast["msg"]:
log("ZNC disconnected on %s - %i" % (self.net, self.num))
self.isconnected = False
self.authenticated = False
if "Connected!" in cast["msg"]:
log("ZNC connected on %s - %i" % (self.net, self.num))
self.isconnected = True