mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Merge remote-tracking branch 'upstream/testing' into channel/part+cycle
Conflicts: plugins/Admin/config.py plugins/Admin/plugin.py
This commit is contained in:
commit
f11d3162ae
@ -231,7 +231,6 @@ class Admin(callbacks.Plugin):
|
|||||||
irc.reply(irc.nick)
|
irc.reply(irc.nick)
|
||||||
nick = wrap(nick, [additional('nick'), additional('something')])
|
nick = wrap(nick, [additional('nick'), additional('something')])
|
||||||
|
|
||||||
@internationalizeDocstring
|
|
||||||
class capability(callbacks.Commands):
|
class capability(callbacks.Commands):
|
||||||
|
|
||||||
@internationalizeDocstring
|
@internationalizeDocstring
|
||||||
|
@ -46,10 +46,11 @@ 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. The standard substitutions ($version, $nick, etc.) are all handled
|
||||||
|
appropriately."""))
|
||||||
|
|
||||||
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. The standard
|
||||||
|
substitutions ($version, $nick, etc.) are all handled appropriately.
|
||||||
"""
|
"""
|
||||||
text = text or self.registryValue('quitMsg') or msg.nick
|
text = text or self.registryValue('quitMsg') or msg.nick
|
||||||
|
text = ircutils.standardSubstitute(irc, msg, text)
|
||||||
irc.noReply()
|
irc.noReply()
|
||||||
m = ircmsgs.quit(text)
|
m = ircmsgs.quit(text)
|
||||||
world.upkeep()
|
world.upkeep()
|
||||||
|
@ -69,6 +69,7 @@ import supybot.i18n as i18n
|
|||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
import supybot.questions as questions
|
import supybot.questions as questions
|
||||||
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
from supybot.version import version
|
from supybot.version import version
|
||||||
|
|
||||||
@ -104,6 +105,7 @@ def main():
|
|||||||
for irc in world.ircs:
|
for irc in world.ircs:
|
||||||
quitmsg = conf.supybot.plugins.Owner.quitMsg() or \
|
quitmsg = conf.supybot.plugins.Owner.quitMsg() or \
|
||||||
'Ctrl-C at console.'
|
'Ctrl-C at console.'
|
||||||
|
quitmsg = ircutils.standardSubstitute(irc, None, quitmsg)
|
||||||
irc.queueMsg(ircmsgs.quit(quitmsg))
|
irc.queueMsg(ircmsgs.quit(quitmsg))
|
||||||
irc.die()
|
irc.die()
|
||||||
except SystemExit as e:
|
except SystemExit as e:
|
||||||
|
@ -49,7 +49,7 @@ from cStringIO import StringIO as sio
|
|||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
from . import minisix
|
from . import minisix
|
||||||
|
from .version import version
|
||||||
|
|
||||||
def debug(s, *args):
|
def debug(s, *args):
|
||||||
"""Prints a debug string. Most likely replaced by our logging debug."""
|
"""Prints a debug string. Most likely replaced by our logging debug."""
|
||||||
@ -690,6 +690,7 @@ def standardSubstitute(irc, msg, text, env=None):
|
|||||||
'm': localtime[4], 'min': localtime[4], 'minute': localtime[4],
|
'm': localtime[4], 'min': localtime[4], 'minute': localtime[4],
|
||||||
's': localtime[5], 'sec': localtime[5], 'second': localtime[5],
|
's': localtime[5], 'sec': localtime[5], 'second': localtime[5],
|
||||||
'tz': time.strftime('%Z', localtime),
|
'tz': time.strftime('%Z', localtime),
|
||||||
|
'version': 'Supybot %s' % version,
|
||||||
})
|
})
|
||||||
if irc:
|
if irc:
|
||||||
vars.update({
|
vars.update({
|
||||||
|
Loading…
Reference in New Issue
Block a user