.BANCHO. .FIX. Never kill IRC
This commit is contained in:
parent
d83bafd12a
commit
77178a8ce0
|
@ -414,6 +414,7 @@ class Client:
|
||||||
|
|
||||||
def noticePrivmsgHandler(self, command, arguments):
|
def noticePrivmsgHandler(self, command, arguments):
|
||||||
"""NOTICE and PRIVMSG commands handler (same syntax)"""
|
"""NOTICE and PRIVMSG commands handler (same syntax)"""
|
||||||
|
meme()
|
||||||
# Syntax check
|
# Syntax check
|
||||||
if len(arguments) == 0:
|
if len(arguments) == 0:
|
||||||
self.replyCode(411, "No recipient given ({})".format(command))
|
self.replyCode(411, "No recipient given ({})".format(command))
|
||||||
|
@ -592,8 +593,8 @@ class Server:
|
||||||
lastAliveCheck = time.time()
|
lastAliveCheck = time.time()
|
||||||
|
|
||||||
# Main server loop
|
# Main server loop
|
||||||
try:
|
while True:
|
||||||
while True:
|
try:
|
||||||
(iwtd, owtd, ewtd) = select.select(
|
(iwtd, owtd, ewtd) = select.select(
|
||||||
[serversocket] + [x.socket for x in self.clients.values()],
|
[serversocket] + [x.socket for x in self.clients.values()],
|
||||||
[x.socket for x in self.clients.values()
|
[x.socket for x in self.clients.values()
|
||||||
|
@ -627,10 +628,10 @@ class Server:
|
||||||
for client in list(self.clients.values()):
|
for client in list(self.clients.values()):
|
||||||
client.checkAlive()
|
client.checkAlive()
|
||||||
lastAliveCheck = now
|
lastAliveCheck = now
|
||||||
except:
|
except:
|
||||||
log.error("[IRC] Unknown error!\n```\n{}\n{}```".format(sys.exc_info(), traceback.format_exc()))
|
log.error("[IRC] Unknown error!\n```\n{}\n{}```".format(sys.exc_info(), traceback.format_exc()))
|
||||||
if glob.sentry == True:
|
if glob.sentry == True:
|
||||||
sentryClient.captureException()
|
sentryClient.captureException()
|
||||||
|
|
||||||
def main(port=6667):
|
def main(port=6667):
|
||||||
glob.ircServer = Server(port)
|
glob.ircServer = Server(port)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user