irclib: expand standard substitutions in realname

This commit is contained in:
James Lu 2016-05-22 18:18:14 -07:00 committed by Valentin Lorentz
parent 3776404628
commit 278a111f5f

View File

@ -970,7 +970,8 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
return getattr(network_config, name)() or \ return getattr(network_config, name)() or \
getattr(conf.supybot, name)() getattr(conf.supybot, name)()
self.nick = get_value('nick') self.nick = get_value('nick')
self.user = get_value('user') # Expand variables like $version in realname.
self.user = ircutils.standardSubstitute(self, None, get_value('user'))
self.ident = get_value('ident') self.ident = get_value('ident')
self.alternateNicks = conf.supybot.nick.alternates()[:] self.alternateNicks = conf.supybot.nick.alternates()[:]
self.password = network_config.password() self.password = network_config.password()