mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Added check to make sure a user's hostmask doesn't mask another's.
This commit is contained in:
parent
3c419192c8
commit
a5a1211f76
@ -286,6 +286,14 @@ class UsersDictionary(object):
|
|||||||
name = self.getUserName(s)
|
name = self.getUserName(s)
|
||||||
else:
|
else:
|
||||||
name = s
|
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
|
self.dict[name] = u
|
||||||
|
|
||||||
def hasUser(self, s):
|
def hasUser(self, s):
|
||||||
|
Loading…
Reference in New Issue
Block a user