3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

changehost: explicitly ignore PyLink internal clients

This commit is contained in:
James Lu 2016-11-20 12:04:30 -08:00
parent 501647805c
commit d90f44c510

View File

@ -16,6 +16,12 @@ allowed_chars = string.ascii_letters + '-./:' + string.digits
def _changehost(irc, target, args): def _changehost(irc, target, args):
changehost_conf = conf.conf.get("changehost") changehost_conf = conf.conf.get("changehost")
if target not in irc.users:
return
elif irc.isInternalClient(target):
log.debug('(%s) Skipping changehost on internal client %s', irc.name, target)
return
if not changehost_conf: if not changehost_conf:
log.warning("(%s) Missing 'changehost:' configuration block; " log.warning("(%s) Missing 'changehost:' configuration block; "
"Changehost will not function correctly!", irc.name) "Changehost will not function correctly!", irc.name)