From 32038e666a79c07fa5247b298173f5e049012020 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 8 Apr 2016 22:02:08 -0700 Subject: [PATCH] hybrid: track vHost changes (#198) --- protocols/hybrid.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/protocols/hybrid.py b/protocols/hybrid.py index 20cec01..451642e 100644 --- a/protocols/hybrid.py +++ b/protocols/hybrid.py @@ -253,6 +253,20 @@ class HybridProtocol(TS6Protocol): self.irc.callHooks([target, 'CLIENT_SERVICES_LOGIN', {'text': account}]) parsedmodes.remove(modepair) + elif modepair[0] == '+x': + # SVSMODE is also used to set cloaks on Hybrid. + # "SVSMODE 001TARGET +x some.host" would change 001TARGET's host + # to some.host, for example. + host = modepair[1] + + self.irc.users[target].host = host + + # Propagate the hostmask change as a hook. + self.irc.callHooks([numeric, 'CHGHOST', + {'target': target, 'newhost': host}]) + + parsedmodes.remove(modepair) + if parsedmodes: utils.applyModes(self.irc, target, parsedmodes)