mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Substitute $nick and friends with <console> when exiting on Ctrl-C
This commit is contained in:
parent
d96d464698
commit
17a0348d9a
@ -117,7 +117,14 @@ 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)
|
# Because we're quitting from the console, none of the
|
||||||
|
# standard msg substitutions exist, and these will show as
|
||||||
|
# raw strings by default. Substitute them here with
|
||||||
|
# something meaningful instead.
|
||||||
|
env = dict((key, '<console>')
|
||||||
|
for key in ('who', 'nick', 'user', 'host'))
|
||||||
|
quitmsg = ircutils.standardSubstitute(irc, None, quitmsg,
|
||||||
|
env=env)
|
||||||
irc.queueMsg(ircmsgs.quit(quitmsg))
|
irc.queueMsg(ircmsgs.quit(quitmsg))
|
||||||
irc.die()
|
irc.die()
|
||||||
except SystemExit as e:
|
except SystemExit as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user