ircutils: add $network to standard substitutions

This commit is contained in:
James Lu 2016-03-14 19:33:47 -07:00
parent 1d62a0a7c5
commit 1b0c2ab95a
2 changed files with 3 additions and 0 deletions

View File

@ -824,6 +824,7 @@ def standardSubstitute(irc, msg, text, env=None):
if irc:
vars.update({
'botnick': irc.nick,
'network': irc.network,
})
if msg:

View File

@ -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