From 83494482a2a80993d20567656c6e50db5459da04 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 23 Jul 2015 11:44:38 -0700 Subject: [PATCH] relay: don't ever quit the main client or part it from autojoin channels --- plugins/relay.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index 935eae7..90d6f6e 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -663,9 +663,14 @@ def removeChannel(irc, channel): for user in irc.channels[channel].users.copy(): if not utils.isInternalClient(irc, user): relayPart(irc, channel, user) + # Don't ever part the main client from any of its autojoin channels. else: + if user == irc.pseudoclient.uid and channel in \ + irc.serverdata['channels']: + continue irc.proto.partClient(irc, user, channel, 'Channel delinked.') - if not irc.users[user].channels: + # Don't ever quit it either... + if user != irc.pseudoclient.uid and not irc.users[user].channels: irc.proto.quitClient(irc, user, 'Left all shared channels.') remoteuser = getLocalUser(irc, user) del relayusers[remoteuser][irc.name]