redo substitution when we get resource from config. fixes #3060

This commit is contained in:
Yann Leboulanger 2007-06-30 08:40:14 +00:00
parent 965e2b1c78
commit 31f3e2f44a
1 changed files with 6 additions and 0 deletions

View File

@ -747,6 +747,12 @@ class Connection(ConnectionHandlers):
self.on_purpose = False
self.server_resource = gajim.config.get_per('accounts', self.name,
'resource')
# All valid resource substitution strings should be added to this hash.
if self.server_resource:
self.server_resource = Template(self.server_resource).\
safe_substitute({
'hostname': socket.gethostname()
})
self.connect_and_init(show, msg, signed)
elif show == 'offline':