mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
Merge pull request #1302 from ProgVal/glolol/console-quit-subst
Substitute $nick and friends with <console> when exiting on Ctrl-C
This commit is contained in:
commit
12c8fa2e71
@ -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