Add support for IRCv3.2 extension chghost.

This commit is contained in:
Valentin Lorentz 2015-08-22 20:48:03 +02:00
parent 39df987274
commit 943c8bc495

View File

@ -523,6 +523,12 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
if type == '@': if type == '@':
c.modes['s'] = None c.modes['s'] = None
def doChghost(self, irc, msg):
(user, host) = msg.args
nick = msg.nick
hostmask = '%s!%s@%s' % (nick, user, host)
self.nicksToHostmasks[nick] = hostmask
def doJoin(self, irc, msg): def doJoin(self, irc, msg):
for channel in msg.args[0].split(','): for channel in msg.args[0].split(','):
if channel in self.channels: if channel in self.channels:
@ -955,7 +961,8 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
REQUEST_CAPABILITIES = set(['account-notify', 'extended-join', REQUEST_CAPABILITIES = set(['account-notify', 'extended-join',
'multi-prefix', 'metadata-notify', 'account-tag', 'multi-prefix', 'metadata-notify', 'account-tag',
'userhost-in-names', 'invite-notify', 'server-time']) 'userhost-in-names', 'invite-notify', 'server-time',
'chghost'])
def _queueConnectMessages(self): def _queueConnectMessages(self):
if self.zombie: if self.zombie: