3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 18:54:05 +01:00

relay: don't error if the pylink service is gone (e.g. during shutdown)

This commit is contained in:
James Lu 2017-05-07 13:58:11 -07:00
parent b83aba0b13
commit 24b5fd92ef

View File

@ -483,7 +483,8 @@ def initialize_channel(irc, channel):
log.debug('(%s) relay.initialize_channel: joining our (%s) users: %s', irc.name, remotenet, irc.channels[channel].users) log.debug('(%s) relay.initialize_channel: joining our (%s) users: %s', irc.name, remotenet, irc.channels[channel].users)
relay_joins(irc, channel, irc.channels[channel].users, irc.channels[channel].ts) relay_joins(irc, channel, irc.channels[channel].users, irc.channels[channel].ts)
world.services['pylink'].join(irc, channel) if 'pylink' in world.services:
world.services['pylink'].join(irc, channel)
def remove_channel(irc, channel): def remove_channel(irc, channel):
"""Destroys a relay channel by parting all of its users.""" """Destroys a relay channel by parting all of its users."""