3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

relay: handle squit, quitting the relevant relay pseudoclients with a fake netsplit message

This is hardcoded to *.net *.split, but it may change to show the split servers in the future...
This commit is contained in:
James Lu 2015-07-15 19:09:10 -07:00
parent e413a21e68
commit 2f38b2b38d

View File

@ -215,6 +215,13 @@ def handle_quit(irc, numeric, command, args):
del relayusers[(irc.name, ouruser)]
utils.add_hook(handle_quit, 'QUIT')
def handle_squit(irc, numeric, command, args):
users = args['users']
for user in users:
log.debug('(%s) relay handle_squit: sending handle_quit on %s', irc.name, user)
handle_quit(irc, user, command, {'text': '*.net *.split'})
utils.add_hook(handle_squit, 'SQUIT')
def handle_nick(irc, numeric, command, args):
for netname, user in relayusers[(irc.name, numeric)].items():
remoteirc = utils.networkobjects[netname]