Added check to make sure a user's hostmask doesn't mask another's.

This commit is contained in:
Jeremy Fincher 2003-04-08 07:28:45 +00:00
parent 3c419192c8
commit a5a1211f76

View File

@ -286,6 +286,14 @@ class UsersDictionary(object):
name = self.getUserName(s)
else:
name = s
for hostmask in u.hostmasks:
try:
username = self.getUserName(hostmask)
if username != name:
raise ValueError, 'User has hostmasks already matching ' \
'another user\'s hostmasks.'
except KeyError:
pass
self.dict[name] = u
def hasUser(self, s):