From 31f3e2f44ad56bc37dcd8e71feafb73d707f1bce Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 30 Jun 2007 08:40:14 +0000 Subject: [PATCH] redo substitution when we get resource from config. fixes #3060 --- src/common/connection.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/connection.py b/src/common/connection.py index d58485cc8..70b9d7a41 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -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':