Fixed a bug in setprefixchar where things would get wonky when trying to set an

invalid prefixchar
This commit is contained in:
Daniel DiPaolo 2003-12-05 19:10:09 +00:00
parent 926904031f
commit 2e4ecfe03b
2 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
if c not in conf.validPrefixChars:
s = 'PrefixChars must be something in %r'%conf.validPrefixChars
irc.error(msg, s)
return
else:
conf.prefixChars = s
irc.reply(msg, conf.replySuccess)

View File

@ -57,6 +57,7 @@ class AdminTestCase(PluginTestCase, PluginDocumentation):
def testSetprefixchar(self):
self.assertNotError('setprefixchar $')
self.assertResponse('getprefixchar', "'$'")
self.assertError('setprefixchar p')
def testAddcapability(self):
self.assertError('addcapability sdlkfj foo')