From ad8883a72412653f8c73c7c5bcef05f1c7710e45 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 18 Nov 2015 12:18:46 +0100 Subject: [PATCH] Network: Perform susbstitution in quit message. --- plugins/Network/plugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index e356abace..1866fb6be 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -112,7 +112,10 @@ class Network(callbacks.Plugin): message. is only necessary if the network is different from the network the command is sent on. """ - quitMsg = quitMsg or conf.supybot.plugins.Owner.quitMsg() or msg.nick + standard_msg = conf.supybot.plugins.Owner.quitMsg() + if standard_msg: + standard_msg = ircutils.standardSubstitute(irc, msg, standard_msg) + quitMsg = quitMsg or standard_msg or msg.nick otherIrc.queueMsg(ircmsgs.quit(quitMsg)) otherIrc.die() conf.supybot.networks().discard(otherIrc.network) @@ -131,7 +134,10 @@ class Network(callbacks.Plugin): (supybot.plugins.Owner.quitMsg) or the nick of the person giving the command. """ - quitMsg = quitMsg or conf.supybot.plugins.Owner.quitMsg() or msg.nick + standard_msg = conf.supybot.plugins.Owner.quitMsg() + if standard_msg: + standard_msg = ircutils.standardSubstitute(irc, msg, standard_msg) + quitMsg = quitMsg or standard_msg or msg.nick otherIrc.queueMsg(ircmsgs.quit(quitMsg)) if otherIrc != irc: # No need to reply if we're reconnecting ourselves.