mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed a bug in setprefixchar where things would get wonky when trying to set an
invalid prefixchar
This commit is contained in:
parent
926904031f
commit
2e4ecfe03b
@ -263,6 +263,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
if c not in conf.validPrefixChars:
|
if c not in conf.validPrefixChars:
|
||||||
s = 'PrefixChars must be something in %r'%conf.validPrefixChars
|
s = 'PrefixChars must be something in %r'%conf.validPrefixChars
|
||||||
irc.error(msg, s)
|
irc.error(msg, s)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
conf.prefixChars = s
|
conf.prefixChars = s
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
@ -57,6 +57,7 @@ class AdminTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
def testSetprefixchar(self):
|
def testSetprefixchar(self):
|
||||||
self.assertNotError('setprefixchar $')
|
self.assertNotError('setprefixchar $')
|
||||||
self.assertResponse('getprefixchar', "'$'")
|
self.assertResponse('getprefixchar', "'$'")
|
||||||
|
self.assertError('setprefixchar p')
|
||||||
|
|
||||||
def testAddcapability(self):
|
def testAddcapability(self):
|
||||||
self.assertError('addcapability sdlkfj foo')
|
self.assertError('addcapability sdlkfj foo')
|
||||||
|
Loading…
Reference in New Issue
Block a user