mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
User: Handle DuplicateHostmask exception in hostmask.add.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 577294f489
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
1fbc28b376
commit
828b82ea9c
@ -327,6 +327,8 @@ class User(callbacks.Plugin):
|
|||||||
ircdb.users.setUser(user)
|
ircdb.users.setUser(user)
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
irc.error(str(e), Raise=True)
|
irc.error(str(e), Raise=True)
|
||||||
|
except ircdb.DuplicateHostmask:
|
||||||
|
irc.error('That hostmask is already registered.', Raise=True)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
add = wrap(add, ['private', first('otherUser', 'user'),
|
add = wrap(add, ['private', first('otherUser', 'user'),
|
||||||
optional('something'), additional('something', '')])
|
optional('something'), additional('something', '')])
|
||||||
|
Loading…
Reference in New Issue
Block a user