mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
utils: don't allow hostmasks/banmasks to have # in them
This commit is contained in:
parent
4323c19c40
commit
b8fe622cc8
3
utils.py
3
utils.py
@ -159,7 +159,8 @@ def isServerName(s):
|
||||
hostmaskRe = re.compile(r'^\S+!\S+@\S+$')
|
||||
def isHostmask(text):
|
||||
"""Returns whether the given text is a valid hostmask."""
|
||||
return bool(hostmaskRe.match(text))
|
||||
# Band-aid patch here to prevent bad bans set by Janus forwarding people into invalid channels.
|
||||
return hostmaskRe.match(text) and '#' not in text
|
||||
|
||||
def parseModes(irc, target, args):
|
||||
"""Parses a modestring list into a list of (mode, argument) tuples.
|
||||
|
Loading…
Reference in New Issue
Block a user