diff --git a/example-conf.yml b/example-conf.yml index ecf6e4c..eefdade 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -370,7 +370,7 @@ changehost: # This sets the hostmasks that Changehost should look for. Whenever someone # with a matching nick!user@host connects, their host will be set to the # text defined. The following substitutions are available here: - # $uid, $ts (time of connection), $nick, $realhost, $host, $ident, $ip. + # $uid, $ts (time of connection), $nick, $realhost, $ident, amd $ip. # Invalid characters in hosts are replaced with a "-". # Also, make sure you quote each entry so the YAML parser treats them as # raw strings. diff --git a/plugins/changehost.py b/plugins/changehost.py index fe5603c..ffe6d3c 100644 --- a/plugins/changehost.py +++ b/plugins/changehost.py @@ -38,7 +38,10 @@ def _changehost(irc, target, args): # Substitute using the fields provided the hook data. This means # that the following variables are available for substitution: - # $uid, $ts, $nick, $realhost, $host, $ident, $ip + # $uid, $ts, $nick, $realhost, $ident, and $ip. $host is explicitly + # forbidden because it can cause recursive loops. + + del args['host'] new_host = template.substitute(args) # Replace characters that are not allowed in hosts with "-".