mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made register command guard against people with matching hostmasks trying to register again.
This commit is contained in:
parent
3d990599fe
commit
d6f5bd3747
@ -70,6 +70,12 @@ class UserCommands(callbacks.Privmsg):
|
||||
if ircutils.isUserHostmask(name):
|
||||
irc.error(msg, 'Hostmasks aren\'t valid usernames.')
|
||||
return
|
||||
try:
|
||||
u = ircdb.users.getUser(msg.prefix)
|
||||
irc.error(msg,'Your hostmask is already registered to %s' % u.name)
|
||||
return
|
||||
except KeyError:
|
||||
pass
|
||||
(id, user) = ircdb.users.newUser()
|
||||
user.name = name
|
||||
user.setPassword(password)
|
||||
|
Loading…
Reference in New Issue
Block a user