3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

changehost: check users' real hosts instead of their displayed vHosts

This commit is contained in:
James Lu 2015-12-31 18:46:09 -08:00
parent 0430e1dae7
commit 9ac9bc1137

View File

@ -42,9 +42,10 @@ def handle_uid(irc, sender, command, args):
return return
target = args['uid'] target = args['uid']
target_host = utils.getHostmask(irc, target, realhost=True)
for host_glob, host_template in changehost_hosts.items(): for host_glob, host_template in changehost_hosts.items():
if ircmatch.match(0, host_glob, utils.getHostmask(irc, target)): if ircmatch.match(0, host_glob, target_host):
# This uses template strings for simple substitution: # This uses template strings for simple substitution:
# https://docs.python.org/3/library/string.html#template-strings # https://docs.python.org/3/library/string.html#template-strings
template = string.Template(host_template) template = string.Template(host_template)