- Timestamp:
- 2007-09-03T22:22:55Z (17 years ago)
- Branches:
- master
- Children:
- dab0f8a
- Parents:
- 02a531b
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r02a531b r7613670 261 261 * when we got the message's 262 262 * body. */ 263 g_free(sd->handle); 263 264 sd->handle = g_strdup_printf("%s@skype.com", info); 264 265 } … … 270 271 /* New body, we have everything to use imcb_buddy_msg() now! */ 271 272 imcb_buddy_msg(ic, sd->handle, info, 0, 0); 272 g_free(sd->handle);273 sd->handle = NULL;274 273 } 275 274 } … … 380 379 381 380 g_free(sd->username); 381 g_free(sd->handle); 382 382 g_free(sd); 383 383 ic->proto_data = NULL; -
skype/skyped.py
r02a531b r7613670 53 53 for i in input.split("\n"): 54 54 if i: 55 fd.send((skype.send(i.strip()) + "\n").encode(locale.getdefaultlocale()[1])) 55 for j in skype.send(i.strip()): 56 fd.send((j + "\n").encode(locale.getdefaultlocale()[1])) 56 57 return True 57 58 … … 85 86 86 87 reply = self.send('NAME ' + CLIENT_NAME) 87 if reply != 'OK':88 if reply[0] != 'OK': 88 89 sys.exit('Could not bind to Skype client') 89 90 … … 117 118 pass 118 119 mainloop.quit() 119 dprint('<< ' + reply) 120 if "\n" in reply: 121 # crappy skype prefixes only the first line for 122 # multiline messages so we need to do so for the other 123 # lines, too. this is something like: 124 # 'CHATMESSAGE id BODY first line\nsecond line' -> 125 # 'CHATMESSAGE id BODY first line\nCHATMESSAGE id BODY second line' 126 prefix = " ".join(reply.split(" ")[:3]) 127 reply = ["%s %s" % (prefix, i) for i in " ".join(reply.split(" ")[3:]).split("\n")] 128 else: 129 reply = [reply] 130 for i in reply: 131 dprint('<< ' + i) 120 132 return reply 121 133
Note: See TracChangeset
for help on using the changeset viewer.