Config: Add : prefix to network-specific values listed by 'config list'.

This commit is contained in:
Valentin Lorentz 2019-11-02 18:50:20 +01:00
parent 322923c957
commit 813f688858
2 changed files with 4 additions and 2 deletions

View File

@ -159,7 +159,9 @@ class Config(callbacks.Plugin):
irc.isChannel(vname):
# Skip pseudo-children that are channel names
continue
if hasattr(v, '_channelValue') and v._channelValue:
if getattr(v, '_networkValue', False):
vname = ':' + vname
if getattr(v, '_channelValue', False):
vname = '#' + vname
if v._added and not all(irc.isChannel, v._added):
vname = '@' + vname

View File

@ -53,7 +53,7 @@ class ConfigTestCase(ChannelPluginTestCase):
self.assertError('config list asldfkj')
self.assertError('config list supybot.asdfkjsldf')
self.assertNotError('config list supybot')
self.assertNotError('config list supybot.replies')
self.assertRegexp('config list supybot.replies', ', #:errorOwner, ')
self.assertRegexp('config list supybot', r'@plugins.*@replies.*@reply')
def testListExcludes(self):