mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
String: cap maximum soundex length to 1024.
This commit is contained in:
parent
72bc227e1b
commit
f6209a90c2
@ -164,8 +164,11 @@ class String(callbacks.Plugin):
|
|||||||
|
|
||||||
Returns the Soundex hash to a given length. The length defaults to
|
Returns the Soundex hash to a given length. The length defaults to
|
||||||
4, since that's the standard length for a soundex hash. For unlimited
|
4, since that's the standard length for a soundex hash. For unlimited
|
||||||
length, use 0.
|
length, use 0. Maximum length 1024.
|
||||||
"""
|
"""
|
||||||
|
if length > 1024:
|
||||||
|
irc.error("Maximum allowed length is 1024.")
|
||||||
|
return
|
||||||
irc.reply(utils.str.soundex(text, length))
|
irc.reply(utils.str.soundex(text, length))
|
||||||
soundex = wrap(soundex, ['somethingWithoutSpaces', additional('int', 4)])
|
soundex = wrap(soundex, ['somethingWithoutSpaces', additional('int', 4)])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user