mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 03:33:10 +01:00
changehost: check users' real hosts instead of their displayed vHosts
This commit is contained in:
parent
0430e1dae7
commit
9ac9bc1137
@ -42,9 +42,10 @@ def handle_uid(irc, sender, command, args):
|
||||
return
|
||||
|
||||
target = args['uid']
|
||||
target_host = utils.getHostmask(irc, target, realhost=True)
|
||||
|
||||
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:
|
||||
# https://docs.python.org/3/library/string.html#template-strings
|
||||
template = string.Template(host_template)
|
||||
|
Loading…
Reference in New Issue
Block a user