mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Config: Also tell about current channel value in @help if it is different from the global one. Closes GH-581.
This commit is contained in:
parent
4d9a8a1408
commit
36568aa849
@ -239,7 +239,18 @@ class Config(callbacks.Plugin):
|
||||
s = group.help()
|
||||
if s:
|
||||
if hasattr(group, 'value') and not group._private:
|
||||
s += _(' (Current value: %s)') % group
|
||||
channel = msg.args[0]
|
||||
if irc.isChannel(channel):
|
||||
globvalue = str(group)
|
||||
chanvalue = str(group.get(channel))
|
||||
if chanvalue != globvalue:
|
||||
s += _(' (Current global value: %s; '
|
||||
'current channel value: %s)') % \
|
||||
(globvalue, chanvalue)
|
||||
else:
|
||||
s += _(' (Current value: %s)') % group
|
||||
else:
|
||||
s += _(' (Current value: %s)') % group
|
||||
irc.reply(s)
|
||||
else:
|
||||
irc.reply(_('That configuration group exists, but seems to '
|
||||
|
Loading…
Reference in New Issue
Block a user