mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +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:
|
||||
s = 'PrefixChars must be something in %r'%conf.validPrefixChars
|
||||
irc.error(msg, s)
|
||||
return
|
||||
else:
|
||||
conf.prefixChars = s
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user