Deauth bot when disconnected and lowercase user
This commit is contained in:
parent
1fec14d759
commit
f3dd102096
|
@ -72,7 +72,7 @@ class IRCRelay(IRCClient):
|
||||||
if user == None:
|
if user == None:
|
||||||
self.user = main.config["Relay"]["User"]
|
self.user = main.config["Relay"]["User"]
|
||||||
else:
|
else:
|
||||||
self.user = user
|
self.user = user.lower()
|
||||||
password = main.config["Relay"]["Password"]
|
password = main.config["Relay"]["Password"]
|
||||||
self.nickname = "relay"
|
self.nickname = "relay"
|
||||||
self.realname = "relay"
|
self.realname = "relay"
|
||||||
|
@ -167,6 +167,7 @@ class IRCBot(IRCClient):
|
||||||
line = line.decode("utf-8", "replace")
|
line = line.decode("utf-8", "replace")
|
||||||
|
|
||||||
line = lowDequote(line)
|
line = lowDequote(line)
|
||||||
|
trace(self.net, self.num, line)
|
||||||
try:
|
try:
|
||||||
prefix, command, params = parsemsg(line)
|
prefix, command, params = parsemsg(line)
|
||||||
if command in numeric_to_symbolic:
|
if command in numeric_to_symbolic:
|
||||||
|
@ -235,6 +236,7 @@ class IRCBot(IRCClient):
|
||||||
if "Disconnected from IRC" in cast["msg"]:
|
if "Disconnected from IRC" in cast["msg"]:
|
||||||
log("ZNC disconnected on %s - %i" % (self.net, self.num))
|
log("ZNC disconnected on %s - %i" % (self.net, self.num))
|
||||||
self.isconnected = False
|
self.isconnected = False
|
||||||
|
self.authenticated = False
|
||||||
if "Connected!" in cast["msg"]:
|
if "Connected!" in cast["msg"]:
|
||||||
log("ZNC connected on %s - %i" % (self.net, self.num))
|
log("ZNC connected on %s - %i" % (self.net, self.num))
|
||||||
self.isconnected = True
|
self.isconnected = True
|
||||||
|
|
Loading…
Reference in New Issue