3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 20:22:45 +01:00

inspircd: use parse_as instead of forcibly mapping ENCAP to KNOCK

This commit is contained in:
James Lu 2015-08-03 05:00:32 -07:00
parent 55a4fcd8be
commit e5eb58ee73

View File

@ -15,11 +15,9 @@ casemapping = 'rfc1459'
# Raw commands sent from servers vary from protocol to protocol. Here, we map # Raw commands sent from servers vary from protocol to protocol. Here, we map
# non-standard names to our hook handlers, so plugins get the information they need. # non-standard names to our hook handlers, so plugins get the information they need.
# XXX figure out a way to not force-map ENCAP to KNOCK, since other commands are sent
# through it too.
hook_map = {'FJOIN': 'JOIN', 'RSQUIT': 'SQUIT', 'FMODE': 'MODE', hook_map = {'FJOIN': 'JOIN', 'RSQUIT': 'SQUIT', 'FMODE': 'MODE',
'FTOPIC': 'TOPIC', 'ENCAP': 'KNOCK', 'OPERTYPE': 'MODE', 'FTOPIC': 'TOPIC', 'OPERTYPE': 'MODE', 'FHOST': 'CHGHOST',
'FHOST': 'CHGHOST', 'FIDENT': 'CHGIDENT', 'FNAME': 'CHGNAME'} 'FIDENT': 'CHGIDENT', 'FNAME': 'CHGNAME'}
def _send(irc, sid, msg): def _send(irc, sid, msg):
irc.send(':%s %s' % (sid, msg)) irc.send(':%s %s' % (sid, msg))
@ -634,7 +632,7 @@ def handle_encap(irc, numeric, command, args):
if targetmask == '*' and real_command == 'KNOCK': if targetmask == '*' and real_command == 'KNOCK':
channel = args[2].lower() channel = args[2].lower()
text = args[3] text = args[3]
return {'encapcommand': real_command, 'channel': channel, return {'parse_as': real_command, 'channel': channel,
'text': text} 'text': text}
def handle_notice(irc, numeric, command, args): def handle_notice(irc, numeric, command, args):