Made sure the wizard doesn't allow bad prefixchars.

This commit is contained in:
Jeremy Fincher 2003-10-19 19:23:39 +00:00
parent d21a99a37a
commit b727890b15
1 changed files with 6 additions and 0 deletions

View File

@ -429,8 +429,14 @@ def main():
on accident). You can even have more than one. I (jemfinch) am quite
partial to @, but that's because I've been using it since my ocamlbot
days.""")
import callbacks
conf.prefixChars = anything('What would you like your bot\'s '
'prefix character(s) to be?')
while callbacks.canonicalName(conf.prefixChars) != conf.prefixChars:
conf.prefixChars = anything('That includes one or more invalid '
'prefix characters. What would you'
'like your bot\'s prefix character(s)'
'to be?')
configVariables['prefixChars'] = conf.prefixChars
else:
configVariables['prefixChars'] = ''