From 994eaef12cf15f7a1ecd9d54a38843e4c1485ad6 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 26 Nov 2015 22:34:15 -0800 Subject: [PATCH] unreal: forcibly SETHOST to the desired vHost in spawnClient This prevents real host / IP address leaks, since the "virt host" specified in UID doesn't seem to be respected by the IRCd (real host is shown instead). Workaround for #136. --- protocols/unreal.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protocols/unreal.py b/protocols/unreal.py index 9899400..a2d67ca 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -90,6 +90,12 @@ class UnrealProtocol(TS6BaseProtocol): nick=nick, ident=ident, uid=uid, modes=raw_modes, realname=realname, realhost=realhost, ip=encoded_ip)) + + # Force the virtual hostname to show correctly by running SETHOST on + # the user. Otherwise, Unreal will show the real host of the person + # instead, which is probably not what we want. + self.updateClient(uid, 'HOST', host) + return u def joinClient(self, client, channel):