mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-19 23:20:57 +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)
|
(name, hostmask, password) = privmsgs.getArgs(args, 2, 1)
|
||||||
if not self._checkNotChannel(irc, msg, password):
|
if not self._checkNotChannel(irc, msg, password):
|
||||||
return
|
return
|
||||||
|
if not ircutils.isUserHostmask(hostmask):
|
||||||
|
irc.error(msg, 'That\'s not a valid hostmask.')
|
||||||
|
return
|
||||||
s = hostmask.translate(string.ascii, '!@*?')
|
s = hostmask.translate(string.ascii, '!@*?')
|
||||||
if len(s) < 10:
|
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)
|
irc.error(msg, s)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user