mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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()
|
s = group.help()
|
||||||
if s:
|
if s:
|
||||||
if hasattr(group, 'value') and not group._private:
|
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)
|
irc.reply(s)
|
||||||
else:
|
else:
|
||||||
irc.reply(_('That configuration group exists, but seems to '
|
irc.reply(_('That configuration group exists, but seems to '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user