git » msnlib » commit 3b428eb

Fix renames to allow extended characters.

author Alberto Bertogli
2005-05-14 04:05:04 UTC
committer Alberto Bertogli
2005-05-14 04:05:04 UTC
parent 7a0eac2a8ae6a01b515310989a4d3dbd2f846734

Fix renames to allow extended characters.
It seems to be a bug in the MSN servers because it won't store extended
characters in the nicks we set to people if they're sent url-encoded, so
send them directly in UTF-8.

msnlib.py +4 -2

diff --git a/msnlib.py b/msnlib.py
index 93b6403..fb3cdff 100644
--- a/msnlib.py
+++ b/msnlib.py
@@ -385,10 +385,12 @@ class msnd:
 		self._send('REM', 'AL ' + email)
 		self._send('REM', 'FL ' + email)
 		return 1
-	
+
 	def userren(self, email, newnick):
 		"Renames a user"
-		newnick = urllib.quote(newnick)
+		# don't url-quote the newnick; the server has a bug and it
+		# won't store extended characters that way; send directly the
+		# UTF-8 encoded new nick
 		self._send('REA', email + ' ' + newnick)
 		return 1