Reformat code with pre-commit
This commit is contained in:
@@ -5,7 +5,25 @@ from copy import deepcopy
|
||||
import main
|
||||
from utils.logging.log import *
|
||||
|
||||
validTypes = ["msg", "notice", "action", "who", "part", "join", "kick", "quit", "nick", "topic", "mode", "conn", "znc", "query", "self", "highlight"]
|
||||
validTypes = [
|
||||
"msg",
|
||||
"notice",
|
||||
"action",
|
||||
"who",
|
||||
"part",
|
||||
"join",
|
||||
"kick",
|
||||
"quit",
|
||||
"nick",
|
||||
"topic",
|
||||
"mode",
|
||||
"conn",
|
||||
"znc",
|
||||
"query",
|
||||
"self",
|
||||
"highlight",
|
||||
]
|
||||
|
||||
|
||||
class Relay(Protocol):
|
||||
def __init__(self, addr):
|
||||
@@ -108,7 +126,7 @@ class Relay(Protocol):
|
||||
|
||||
def connectionMade(self):
|
||||
log("Relay connection from %s:%s" % (self.addr.host, self.addr.port))
|
||||
#self.send("Greetings.")
|
||||
# self.send("Greetings.")
|
||||
|
||||
def connectionLost(self, reason):
|
||||
self.authed = False
|
||||
@@ -118,6 +136,7 @@ class Relay(Protocol):
|
||||
else:
|
||||
warn("Tried to remove a non-existant relay connection.")
|
||||
|
||||
|
||||
class RelayFactory(Factory):
|
||||
def buildProtocol(self, addr):
|
||||
entry = Relay(addr)
|
||||
@@ -131,6 +150,7 @@ class RelayFactory(Factory):
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
def sendRelayNotification(cast):
|
||||
for i in main.relayConnections.keys():
|
||||
if main.relayConnections[i].authed:
|
||||
|
||||
Reference in New Issue
Block a user