mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
A little more error-checking can't hurt.
This commit is contained in:
parent
da6f429fe5
commit
6b72288bc2
@ -83,9 +83,12 @@ class UserCommands(callbacks.Privmsg):
|
||||
(name, hostmask, password) = privmsgs.getArgs(args, 2, 1)
|
||||
if not self._checkNotChannel(irc, msg, password):
|
||||
return
|
||||
if not ircutils.isUserHostmask(hostmask):
|
||||
irc.error(msg, 'That\'s not a valid hostmask.')
|
||||
return
|
||||
s = hostmask.translate(string.ascii, '!@*?')
|
||||
if len(s) < 10:
|
||||
s = 'Hostmask must be more than 10 non-wildcard characters.'
|
||||
s = 'Hostmask must contain more than 10 non-wildcard characters.'
|
||||
irc.error(msg, s)
|
||||
return
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user