| 222 channel = unquote_plus(target.split(",")[0]) |
222 channel = unquote_plus(target.split(",")[0]) |
| 223 if channel[0] != "#": |
223 if channel[0] != "#": |
| 224 channel = "#" + channel |
224 channel = "#" + channel |
| 225 gochat(account, {"server": server, "channel": channel, "password": params.get("key", "")}, params.get("msg")) |
225 gochat(account, {"server": server, "channel": channel, "password": params.get("key", "")}, params.get("msg")) |
| 226 |
226 |
| 227 def msnim(uri): |
|
| 228 protocol = "prpl-msn" |
|
| 229 match = re.match(r"^msnim:([^?]*)(\?(.*))", uri) |
|
| 230 if not match: |
|
| 231 print("Invalid msnim URI: %s" % uri) |
|
| 232 return |
|
| 233 |
|
| 234 command = unquote_plus(match.group(1)) |
|
| 235 paramstring = match.group(3) |
|
| 236 params = {} |
|
| 237 if paramstring: |
|
| 238 for param in paramstring.split("&"): |
|
| 239 key, value = extendlist(param.split("=", 1), 2, "") |
|
| 240 params[key] = unquote_plus(value) |
|
| 241 screenname = params.get("contact", "") |
|
| 242 |
|
| 243 account = findaccount(protocol) |
|
| 244 |
|
| 245 if command.lower() == "chat": |
|
| 246 goim(account, screenname) |
|
| 247 elif command.lower() == "add": |
|
| 248 addbuddy(account, screenname) |
|
| 249 |
|
| 250 def myim(uri): |
227 def myim(uri): |
| 251 protocol = "prpl-myspace" |
228 protocol = "prpl-myspace" |
| 252 print "TODO: send uri: ", uri |
229 print "TODO: send uri: ", uri |
| 253 assert False, "Not implemented" |
230 assert False, "Not implemented" |
| 254 |
231 |