mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
p10: add inbound handlers for WALLCHOPS/WALLHOPS/WALLVOICES
This essentially finishes off STATUSMSG support on P10.
This commit is contained in:
parent
2cc1195ff9
commit
20e730ba2b
@ -137,6 +137,7 @@ class P10Protocol(IRCS2SProtocol):
|
||||
'USERIP': 'USERIP',
|
||||
'V': 'VERSION',
|
||||
'WC': 'WALLCHOPS',
|
||||
'WH': 'WALLHOPS',
|
||||
'WA': 'WALLOPS',
|
||||
'WU': 'WALLUSERS',
|
||||
'WV': 'WALLVOICES',
|
||||
@ -160,7 +161,10 @@ class P10Protocol(IRCS2SProtocol):
|
||||
# SID generator for P10.
|
||||
self.sidgen = P10SIDGenerator(self)
|
||||
|
||||
self.hook_map = {'END_OF_BURST': 'ENDBURST', 'OPMODE': 'MODE', 'CLEARMODE': 'MODE', 'BURST': 'JOIN'}
|
||||
self.hook_map = {'END_OF_BURST': 'ENDBURST', 'OPMODE': 'MODE',
|
||||
'CLEARMODE': 'MODE', 'BURST': 'JOIN',
|
||||
'WALLCHOPS': 'NOTICE', 'WALLHOPS': 'NOTICE',
|
||||
'WALLVOICES': 'NOTICE'}
|
||||
|
||||
self.protocol_caps |= {'slash-in-hosts', 'underscore-in-hosts'}
|
||||
|
||||
@ -1305,4 +1309,14 @@ class P10Protocol(IRCS2SProtocol):
|
||||
# 2 <new nick>
|
||||
return {'target': args[0], 'newnick': args[1]}
|
||||
|
||||
def handle_wallchops(self, source, command, args):
|
||||
"""Handles WALLCHOPS/WALLHOPS/WALLVOICES, the equivalent of @#channel
|
||||
messages and the like on P10."""
|
||||
# <- ABAAA WC #magichouse :@ test
|
||||
# <- ABAAA WH #magichouse :% test
|
||||
# <- ABAAA WV #magichouse :+ test
|
||||
prefix, text = args[-1].split(' ', 1)
|
||||
return {'target': prefix+args[0], 'text': text}
|
||||
handle_wallhops = handle_wallvoices = handle_wallchops
|
||||
|
||||
Class = P10Protocol
|
||||
|
Loading…
Reference in New Issue
Block a user