mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Made funkyArgument a bit more concise.
This commit is contained in:
parent
8fd1d71952
commit
817e967716
@ -156,16 +156,9 @@ def bold(s):
|
||||
def validArgument(s):
|
||||
return '\r' not in s and '\n' not in s and '\x00' not in s
|
||||
|
||||
nonFunkyArguments = string.printable+'\x02'
|
||||
notFunky = string.printable+'\x02'
|
||||
def funkyArgument(s):
|
||||
if validArgument(s):
|
||||
if s.translate(string.ascii, nonFunkyArguments) == '':
|
||||
# All characters must be printable.
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
else:
|
||||
return True
|
||||
return validArgument(s) and s.translate(string.ascii, nonFunky) != ''
|
||||
|
||||
def reply(msg):
|
||||
if isChannel(msg.args[0]):
|
||||
|
Loading…
Reference in New Issue
Block a user