3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-30 23:09:23 +01:00

inspircd: alias SVSTOPIC to FTOPIC (reported by @siniStar7boy)

SVSTOPIC is used by services to set topics when m_topiclock (server side topic locking) is enabled on the IRCd. Unfortunately, usage of this isn't documented anywehere......
Basically, this makes PyLink treat it as a regular server topic change (FTOPIC), since the arguments are the same anyways.
This commit is contained in:
James Lu 2015-10-31 19:15:03 -07:00
parent 86d3cd3295
commit c5b3441f6a

View File

@ -23,7 +23,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
# are called with the right hooks. # are called with the right hooks.
self.hook_map = {'FJOIN': 'JOIN', 'RSQUIT': 'SQUIT', 'FMODE': 'MODE', self.hook_map = {'FJOIN': 'JOIN', 'RSQUIT': 'SQUIT', 'FMODE': 'MODE',
'FTOPIC': 'TOPIC', 'OPERTYPE': 'MODE', 'FHOST': 'CHGHOST', 'FTOPIC': 'TOPIC', 'OPERTYPE': 'MODE', 'FHOST': 'CHGHOST',
'FIDENT': 'CHGIDENT', 'FNAME': 'CHGNAME'} 'FIDENT': 'CHGIDENT', 'FNAME': 'CHGNAME', 'SVSTOPIC': 'TOPIC'}
self.sidgen = utils.TS6SIDGenerator(self.irc) self.sidgen = utils.TS6SIDGenerator(self.irc)
self.uidgen = {} self.uidgen = {}
@ -514,6 +514,9 @@ class InspIRCdProtocol(TS6BaseProtocol):
self.irc.channels[channel].topicset = True self.irc.channels[channel].topicset = True
return {'channel': channel, 'setter': setter, 'ts': ts, 'topic': topic} return {'channel': channel, 'setter': setter, 'ts': ts, 'topic': topic}
# SVSTOPIC is used by InspIRCd module m_topiclock - its arguments are the same as FTOPIC
handle_svstopic = handle_ftopic
def handle_invite(self, numeric, command, args): def handle_invite(self, numeric, command, args):
"""Handles incoming INVITEs.""" """Handles incoming INVITEs."""
# <- :70MAAAAAC INVITE 0ALAAAAAA #blah 0 # <- :70MAAAAAC INVITE 0ALAAAAAA #blah 0