X-Git-Url: https://code.delx.au/pymsnt/blobdiff_plain/1d6945f7085242d9d61f4e967a4489f2cd083c4b..6faa958d34a40175b4f831e53ed96a01df35d8da:/src/tlib/msn/msn.py diff --git a/src/tlib/msn/msn.py b/src/tlib/msn/msn.py index 3486e00..fcab164 100644 --- a/src/tlib/msn/msn.py +++ b/src/tlib/msn/msn.py @@ -346,7 +346,7 @@ class PassportLogin(HTTPClient): def connectionMade(self): self.sendCommand('GET', self.path) self.sendHeader('Authorization', 'Passport1.4 OrgVerb=GET,OrgURL=http://messenger.msn.com,' + - 'sign-in=%s,pwd=%s,%s' % (quote(self.userHandle), self.passwd,self.authData)) + 'sign-in=%s,pwd=%s,%s' % (quote(self.userHandle), quote(self.passwd), self.authData)) self.sendHeader('Host', self.host) self.endHeaders() self.headers = {} @@ -812,8 +812,10 @@ class MSNEventBase(LineReceiver): if len(cmd) != 3: raise MSNProtocolError, "Invalid Command, %s" % repr(cmd) if cmd.isdigit(): - if self.ids.has_key(params.split(' ')[0]): - self.ids[id].errback(int(cmd)) + id = params.split(' ')[0] + if id.isdigit() and self.ids.has_key(int(id)): + id = int(id) + self.ids[id][0].errback(int(cmd)) del self.ids[id] return else: # we received an error which doesn't map to a sent command @@ -2031,7 +2033,7 @@ class NotificationFactory(ReconnectingClientFactory): screenName = '' password = '' passportServer = 'https://nexus.passport.com/rdr/pprdr.asp' - status = 'FLN' + status = 'NLN' protocol = NotificationClient maxRetries = 5 @@ -3064,6 +3066,7 @@ errorCodes = { 301 : "Too many FND responses", 302 : "Not logged in", + 400 : "Message not allowed", 402 : "Error accessing contact list", 403 : "Error accessing contact list",