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

This commit is contained in:
Valentin Lorentz 2012-04-04 15:08:49 +02:00
parent dbf1640b38
commit 18b16d84ed
2 changed files with 3 additions and 3 deletions

View File

@ -290,9 +290,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):

View File

@ -1,3 +1,3 @@
"""stick the various versioning attributes in here, so we only have to change """stick the various versioning attributes in here, so we only have to change
them once.""" them once."""
version = '0.83.4.1+limnoria (2012-04-03T15:14:07+0000)' version = '0.83.4.1+limnoria (2012-04-04T13:08:49+0000)'