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

View File

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