mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
Owner: substitute %version% for the Supybot version in plugins.Owner.quitMsg (Closes ProgVal#847)
Cherry-picked from commit GLolol@205199e.
This commit is contained in:
parent
681bd5d85d
commit
0e0feb1a84
@ -46,10 +46,10 @@ conf.registerGlobalValue(Owner, 'public',
|
|||||||
registry.Boolean(True, """Determines whether this plugin is publicly
|
registry.Boolean(True, """Determines whether this plugin is publicly
|
||||||
visible."""))
|
visible."""))
|
||||||
conf.registerGlobalValue(Owner, 'quitMsg',
|
conf.registerGlobalValue(Owner, 'quitMsg',
|
||||||
registry.String('', """Determines what quit message will be used by default.
|
registry.String('%version%', """Determines what quit message will be used by default.
|
||||||
If the quit command is called without a quit message, this will be used. If
|
If the quit command is called without a quit message, this will be used. If
|
||||||
this value is empty, the nick of the person giving the quit command will be
|
this value is empty, the nick of the person giving the quit command will be
|
||||||
used."""))
|
used. %version% is automatically expanded to the bot's current version."""))
|
||||||
|
|
||||||
conf.registerGroup(conf.supybot.commands, 'renames', orderAlphabetically=True)
|
conf.registerGroup(conf.supybot.commands, 'renames', orderAlphabetically=True)
|
||||||
|
|
||||||
|
@ -344,9 +344,11 @@ class Owner(callbacks.Plugin):
|
|||||||
|
|
||||||
Exits the bot with the QUIT message <text>. If <text> is not given,
|
Exits the bot with the QUIT message <text>. If <text> is not given,
|
||||||
the default quit message (supybot.plugins.Owner.quitMsg) will be used.
|
the default quit message (supybot.plugins.Owner.quitMsg) will be used.
|
||||||
If there is no default quitMsg set, your nick will be used.
|
If there is no default quitMsg set, your nick will be used. %version%
|
||||||
|
is automatically expanded to the bot's current version.
|
||||||
"""
|
"""
|
||||||
text = text or self.registryValue('quitMsg') or msg.nick
|
text = text or self.registryValue('quitMsg') or msg.nick
|
||||||
|
text = text.replace("%version%", "Supybot %s" % conf.version)
|
||||||
irc.noReply()
|
irc.noReply()
|
||||||
m = ircmsgs.quit(text)
|
m = ircmsgs.quit(text)
|
||||||
world.upkeep()
|
world.upkeep()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user