mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +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:
|
||||
quitmsg = conf.supybot.plugins.Owner.quitMsg() or \
|
||||
'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.die()
|
||||
except SystemExit as e:
|
||||
|
Loading…
Reference in New Issue
Block a user