From 1e6c5a231ec74f1810d8a94b7585d35fd9be83c7 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 13 Sep 2015 17:58:39 -0700 Subject: [PATCH] relay.handle_topic: don't fail if we're bursting and no old topic exists --- plugins/relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 0f053a4..21cef47 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -707,7 +707,7 @@ utils.add_hook(handle_mode, 'MODE') def handle_topic(irc, numeric, command, args): channel = args['channel'] - oldtopic = args['oldtopic'] + oldtopic = args.get('oldtopic') topic = args['topic'] if checkClaim(irc, channel, numeric): for name, remoteirc in world.networkobjects.items(): @@ -725,7 +725,7 @@ def handle_topic(irc, numeric, command, args): else: rsid = getRemoteSid(remoteirc, irc) remoteirc.proto.topicServer(rsid, remotechan, topic) - else: # Topic change blocked by claim. + elif oldtopic: # Topic change blocked by claim. irc.proto.topicClient(irc.pseudoclient.uid, channel, oldtopic) utils.add_hook(handle_topic, 'TOPIC')