Fixing error in summary with .* ips

This commit is contained in:
Nicolas Coevoet 2019-11-15 15:03:22 +00:00
parent 7fd423a7d8
commit d0ff0d36c4

View File

@ -78,12 +78,12 @@ def matchHostmask (pattern,n,resolve):
if '/' in host:
if host.startswith('gateway/web/freenode/ip.'):
n.ip = cache[n.prefix] = host.split('ip.')[1]
if n.ip != None and '@' in pattern and mcidr.match(pattern.split('@')[1]):
if n.ip != None and '@' in pattern and n.ip.find('*') == -1 and mcidr.match(pattern.split('@')[1]):
address = IPAddress('%s' % n.ip)
network = IPNetwork('%s' % pattern.split('@')[1], strict=False)
if address in network:
return '%s!%s@%s' % (nick,ident,n.ip)
elif n.ip != None and '@' in pattern and m6cidr.match(pattern.split('@')[1]):
elif n.ip != None and '@' in pattern and n.ip.find('*') == -1 and m6cidr.match(pattern.split('@')[1]):
address = IPAddress('%s' % n.ip)
network = IPNetwork('%s' % pattern.split('@')[1], strict=False)
if address in network: