Change the minimal number of non-wildcard characters in hostmask from 8 to 3. Closes GH-276.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
Valentin Lorentz 2012-04-04 15:08:49 +02:00 committed by James McCoy
parent b5eac0994a
commit 8062d9592c

View File

@ -281,9 +281,9 @@ class IrcUser(object):
def addHostmask(self, hostmask): def addHostmask(self, hostmask):
"""Adds a hostmask to the user's hostmasks.""" """Adds a hostmask to the user's hostmasks."""
assert ircutils.isUserHostmask(hostmask), 'got %s' % hostmask assert ircutils.isUserHostmask(hostmask), 'got %s' % hostmask
if len(unWildcardHostmask(hostmask)) < 8: if len(unWildcardHostmask(hostmask)) < 3:
raise ValueError, \ raise ValueError, \
'Hostmask must contain at least 8 non-wildcard characters.' 'Hostmask must contain at least 3 non-wildcard characters.'
self.hostmasks.add(hostmask) self.hostmasks.add(hostmask)
def removeHostmask(self, hostmask): def removeHostmask(self, hostmask):