From 1b0c2ab95a153c307c9f25eb053d4e4faaf96c9d Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 14 Mar 2016 19:33:47 -0700 Subject: [PATCH] ircutils: add $network to standard substitutions --- src/ircutils.py | 1 + test/test_ircutils.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ircutils.py b/src/ircutils.py index 264adc09c..969120126 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -824,6 +824,7 @@ def standardSubstitute(irc, msg, text, env=None): if irc: vars.update({ 'botnick': irc.nick, + 'network': irc.network, }) if msg: diff --git a/test/test_ircutils.py b/test/test_ircutils.py index 908fca7b2..d08515d6e 100644 --- a/test/test_ircutils.py +++ b/test/test_ircutils.py @@ -219,6 +219,8 @@ class FunctionsTestCase(SupyTestCase): msg = ircmsgs.IrcMsg(':%s PRIVMSG #channel :stuff' % self.hostmask) class Irc(object): nick = 'bob' + network = 'testnet' + irc = Irc() f = ircutils.standardSubstitute