BadWords: disallow adding words with a space in them.

Deserialization splits on spaces, so they are not preserved properly.
This commit is contained in:
Valentin Lorentz 2020-09-05 21:37:32 +02:00
parent 97016b9c55
commit f3f628ddba
1 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class BadWords(callbacks.Privmsg):
set.update(words)
self.words.setValue(set)
irc.replySuccess()
add = wrap(add, ['admin', many('something')])
add = wrap(add, ['admin', many('somethingWithoutSpaces')])
@internationalizeDocstring
def remove(self, irc, msg, args, words):
@ -156,7 +156,7 @@ class BadWords(callbacks.Privmsg):
set.discard(word)
self.words.setValue(set)
irc.replySuccess()
remove = wrap(remove, ['admin', many('something')])
remove = wrap(remove, ['admin', many('somethingWithoutSpaces')])
Class = BadWords