mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
relay.handle_topic: don't fail if we're bursting and no old topic exists
This commit is contained in:
parent
4a4c9395d6
commit
1e6c5a231e
@ -707,7 +707,7 @@ utils.add_hook(handle_mode, 'MODE')
|
|||||||
|
|
||||||
def handle_topic(irc, numeric, command, args):
|
def handle_topic(irc, numeric, command, args):
|
||||||
channel = args['channel']
|
channel = args['channel']
|
||||||
oldtopic = args['oldtopic']
|
oldtopic = args.get('oldtopic')
|
||||||
topic = args['topic']
|
topic = args['topic']
|
||||||
if checkClaim(irc, channel, numeric):
|
if checkClaim(irc, channel, numeric):
|
||||||
for name, remoteirc in world.networkobjects.items():
|
for name, remoteirc in world.networkobjects.items():
|
||||||
@ -725,7 +725,7 @@ def handle_topic(irc, numeric, command, args):
|
|||||||
else:
|
else:
|
||||||
rsid = getRemoteSid(remoteirc, irc)
|
rsid = getRemoteSid(remoteirc, irc)
|
||||||
remoteirc.proto.topicServer(rsid, remotechan, topic)
|
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)
|
irc.proto.topicClient(irc.pseudoclient.uid, channel, oldtopic)
|
||||||
|
|
||||||
utils.add_hook(handle_topic, 'TOPIC')
|
utils.add_hook(handle_topic, 'TOPIC')
|
||||||
|
Loading…
Reference in New Issue
Block a user