]> code.delx.au - pymsnt/blobdiff - src/legacy/glue.py
Fixed UTF-8 error
[pymsnt] / src / legacy / glue.py
index 265536059246c50e515309639d1c9bdfab25f892..efcd32fc72e132fb35f3cd283019b8e51d90b75d 100644 (file)
@@ -18,7 +18,7 @@ import lang
 
 
 url = "http://msn-transport.jabberstudio.org"
-version = "0.11.2-dev"   # The transport version
+version = "0.11.3-dev"   # The transport version
 mangle = True            # XDB '@' -> '%' mangling
 id = "msn"               # The transport identifier
 
@@ -36,6 +36,7 @@ defaultAvatar = avatar.AvatarCache().setAvatar(defaultAvatarData)
 
 def reloadConfig():
        msn.MSNConnection.GETALLAVATARS = config.getAllAvatars
+       msn.MSNConnection.BINDADDRESS = config.host
        msn.setDebug(config._debugLevel >= 4)
 
 def isGroupJID(jid):
@@ -483,8 +484,8 @@ class LegacyConnection(msn.MSNConnection):
                if not (c and msnContact): return
 
                show, ptype = state2presence(msnContact.status)
-               status = msnContact.personal.decode("utf-8")
-               screenName = msnContact.screenName.decode("utf-8")
+               status = msnContact.personal.decode("utf-8", "replace")
+               screenName = msnContact.screenName.decode("utf-8", "replace")
 
                c.updateNickname(screenName, push=False)
                c.updatePresence(show, status, ptype, force=True)