mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
Move handle_topic to IRCS2SProtocol
This commit is contained in:
parent
aa4e9335aa
commit
db06ff4338
@ -590,6 +590,19 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
||||
self._remove_client(numeric)
|
||||
return {'text': args[0]}
|
||||
|
||||
def handle_topic(self, numeric, command, args):
|
||||
"""Handles incoming TOPIC changes from clients."""
|
||||
# <- :70MAAAAAA TOPIC #test :test
|
||||
channel = self.to_lower(args[0])
|
||||
topic = args[1]
|
||||
|
||||
oldtopic = self.channels[channel].topic
|
||||
self.channels[channel].topic = topic
|
||||
self.channels[channel].topicset = True
|
||||
|
||||
return {'channel': channel, 'setter': numeric, 'text': topic,
|
||||
'oldtopic': oldtopic}
|
||||
|
||||
def handle_time(self, numeric, command, args):
|
||||
"""Handles incoming /TIME requests."""
|
||||
return {'target': args[0]}
|
||||
|
@ -235,20 +235,6 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
|
||||
return {'target': user, 'ts': 100, 'oldnick': oldnick}
|
||||
|
||||
def handle_topic(self, numeric, command, args):
|
||||
"""Handles incoming TOPIC changes from clients. For topic bursts,
|
||||
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead."""
|
||||
# <- :70MAAAAAA TOPIC #test :test
|
||||
channel = self.to_lower(args[0])
|
||||
topic = args[1]
|
||||
|
||||
oldtopic = self.channels[channel].topic
|
||||
self.channels[channel].topic = topic
|
||||
self.channels[channel].topicset = True
|
||||
|
||||
return {'channel': channel, 'setter': numeric, 'text': topic,
|
||||
'oldtopic': oldtopic}
|
||||
|
||||
def handle_svsnick(self, source, command, args):
|
||||
"""Handles SVSNICK (forced nickname change attempts)."""
|
||||
# InspIRCd:
|
||||
|
Loading…
Reference in New Issue
Block a user