mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
protocols: record the right sender in TOPIC handlers (first part of #127)
This commit is contained in:
parent
f5a828c4af
commit
ff6841c551
@ -257,11 +257,12 @@ class TS6BaseProtocol(Protocol):
|
|||||||
# <- :70MAAAAAA TOPIC #test :test
|
# <- :70MAAAAAA TOPIC #test :test
|
||||||
channel = utils.toLower(self.irc, args[0])
|
channel = utils.toLower(self.irc, args[0])
|
||||||
topic = args[1]
|
topic = args[1]
|
||||||
ts = int(time.time())
|
|
||||||
oldtopic = self.irc.channels[channel].topic
|
oldtopic = self.irc.channels[channel].topic
|
||||||
self.irc.channels[channel].topic = topic
|
self.irc.channels[channel].topic = topic
|
||||||
self.irc.channels[channel].topicset = True
|
self.irc.channels[channel].topicset = True
|
||||||
return {'channel': channel, 'setter': numeric, 'ts': ts, 'text': topic,
|
|
||||||
|
return {'channel': channel, 'setter': numeric, 'text': topic,
|
||||||
'oldtopic': oldtopic}
|
'oldtopic': oldtopic}
|
||||||
|
|
||||||
def handle_part(self, source, command, args):
|
def handle_part(self, source, command, args):
|
||||||
|
@ -715,13 +715,17 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
def handle_topic(self, numeric, command, args):
|
def handle_topic(self, numeric, command, args):
|
||||||
"""Handles the TOPIC command."""
|
"""Handles the TOPIC command."""
|
||||||
# <- GL TOPIC #services GL 1444699395 :weeee
|
# <- GL TOPIC #services GL 1444699395 :weeee
|
||||||
|
# <- TOPIC #services devel.relay 1452399682 :test
|
||||||
channel = utils.toLower(self.irc, args[0])
|
channel = utils.toLower(self.irc, args[0])
|
||||||
topic = args[-1]
|
topic = args[-1]
|
||||||
|
setter = args[1]
|
||||||
ts = args[2]
|
ts = args[2]
|
||||||
|
|
||||||
oldtopic = self.irc.channels[channel].topic
|
oldtopic = self.irc.channels[channel].topic
|
||||||
self.irc.channels[channel].topic = topic
|
self.irc.channels[channel].topic = topic
|
||||||
self.irc.channels[channel].topicset = True
|
self.irc.channels[channel].topicset = True
|
||||||
return {'channel': channel, 'setter': numeric, 'ts': ts, 'text': topic,
|
|
||||||
|
return {'channel': channel, 'setter': setter, 'ts': ts, 'text': topic,
|
||||||
'oldtopic': oldtopic}
|
'oldtopic': oldtopic}
|
||||||
|
|
||||||
def handle_whois(self, numeric, command, args):
|
def handle_whois(self, numeric, command, args):
|
||||||
|
Loading…
Reference in New Issue
Block a user