comparison src/gaim-remote @ 13772:95166d0d6037

[gaim-migrate @ 16184] Remove some print statements that were probably intended for debugging. Suppress printing "None" when there should be no output. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 12 May 2006 22:25:26 +0000
parents 13b7e59a0759
children
comparison
equal deleted inserted replaced
13771:463259ea22ff 13772:95166d0d6037
52 account = cgaim.GaimAccountsFindConnected(accountname, protocolname) 52 account = cgaim.GaimAccountsFindConnected(accountname, protocolname)
53 return account 53 return account
54 except: 54 except:
55 # try to get any account and connect it 55 # try to get any account and connect it
56 account = cgaim.GaimAccountsFindAny(accountname, protocolname) 56 account = cgaim.GaimAccountsFindAny(accountname, protocolname)
57 print gaim.GaimAccountGetUsername(account)
58 gaim.GaimAccountSetStatusVargs(account, "online", 1) 57 gaim.GaimAccountSetStatusVargs(account, "online", 1)
59 gaim.GaimAccountConnect(account) 58 gaim.GaimAccountConnect(account)
60 return account 59 return account
61 60
62 61
66 if protocol == "aim" or protocol == "icq": 65 if protocol == "aim" or protocol == "icq":
67 protocol = "oscar" 66 protocol = "oscar"
68 if protocol is not None: 67 if protocol is not None:
69 protocol = "prpl-" + protocol 68 protocol = "prpl-" + protocol
70 command = match.group(5) 69 command = match.group(5)
71 paramstring = match.group(7) 70 paramstring = match.group(7)
72 params = {} 71 params = {}
73 if paramstring is not None: 72 if paramstring is not None:
74 for param in paramstring.split("&"): 73 for param in paramstring.split("&"):
75 key, value = extendlist(param.split("=",1), 2, "") 74 key, value = extendlist(param.split("=",1), 2, "")
76 params[key] = urllib.unquote(value) 75 params[key] = urllib.unquote(value)
77 76
78 accountname = params.get("account", "") 77 accountname = params.get("account", "")
79 78
80 if command == "goim": 79 if command == "goim":
81 print params
82 account = findaccount(accountname, protocol) 80 account = findaccount(accountname, protocol)
83 conversation = cgaim.GaimConversationNew(1, account, params["screenname"]) 81 conversation = cgaim.GaimConversationNew(1, account, params["screenname"])
84 if "message" in params: 82 if "message" in params:
85 im = cgaim.GaimConversationGetImData(conversation) 83 im = cgaim.GaimConversationGetImData(conversation)
86 gaim.GaimConvImSend(im, params["message"]) 84 gaim.GaimConvImSend(im, params["message"])
205 GaimAccountsFindConnected?name=&protocol=prpl-jabber 203 GaimAccountsFindConnected?name=&protocol=prpl-jabber
206 GaimAccountFindConnected(,prpl-jabber) 204 GaimAccountFindConnected(,prpl-jabber)
207 """ % sys.argv[0] 205 """ % sys.argv[0]
208 206
209 for arg in sys.argv[1:]: 207 for arg in sys.argv[1:]:
210 print execute(arg) 208 output = execute(arg)
211 209
212 210 if (output != None):
211 print output
212