From 8062d9592ccf28ea0a3e7415be7d6847897dc458 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 4 Apr 2012 15:08:49 +0200 Subject: [PATCH] Change the minimal number of non-wildcard characters in hostmask from 8 to 3. Closes GH-276. Signed-off-by: James McCoy --- src/ircdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ircdb.py b/src/ircdb.py index f01e2e5b6..5f10cc107 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -281,9 +281,9 @@ class IrcUser(object): def addHostmask(self, hostmask): """Adds a hostmask to the user's hostmasks.""" assert ircutils.isUserHostmask(hostmask), 'got %s' % hostmask - if len(unWildcardHostmask(hostmask)) < 8: + if len(unWildcardHostmask(hostmask)) < 3: raise ValueError, \ - 'Hostmask must contain at least 8 non-wildcard characters.' + 'Hostmask must contain at least 3 non-wildcard characters.' self.hostmasks.add(hostmask) def removeHostmask(self, hostmask):