3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

protocols: update topic in channel state when sending outbound TOPIC

This commit is contained in:
James Lu 2015-08-15 22:34:40 -07:00
parent 06c466896e
commit c99a6a7b9d
2 changed files with 6 additions and 0 deletions

View File

@ -247,6 +247,8 @@ def topicClient(irc, numeric, target, text):
if not utils.isInternalClient(irc, numeric):
raise LookupError('No such PyLink PseudoClient exists.')
_send(irc, numeric, 'TOPIC %s :%s' % (target, text))
irc.channels[target].topic = text
irc.channels[target].topicset = True
def topicServer(irc, numeric, target, text):
if not utils.isInternalServer(irc, numeric):
@ -254,6 +256,8 @@ def topicServer(irc, numeric, target, text):
ts = int(time.time())
servername = irc.servers[numeric].name
_send(irc, numeric, 'FTOPIC %s %s %s :%s' % (target, ts, servername, text))
irc.channels[target].topic = text
irc.channels[target].topicset = True
def inviteClient(irc, numeric, target, channel):
"""<irc object> <client numeric> <text>

View File

@ -194,6 +194,8 @@ def topicServer(irc, numeric, target, text):
ts = irc.channels[target].ts
servername = irc.servers[numeric].name
_send(irc, numeric, 'TB %s %s %s :%s' % (target, ts, servername, text))
irc.channels[target].topic = text
irc.channels[target].topicset = True
def inviteClient(irc, numeric, target, channel):
"""<irc object> <client numeric> <text>