Mercurial > pidgin.yaz
comparison src/util.c @ 3479:84df15473af6
[gaim-migrate @ 3533]
Robot101 points out that AIM uri's don't have // in them.
aim:goim?screenname=bzubhipheron&message=thanks+for+the+fix+robot101
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 30 Aug 2002 16:20:40 +0000 |
parents | 3da42b64304e |
children | f38516e5d1ab |
comparison
equal
deleted
inserted
replaced
3478:3da42b64304e | 3479:84df15473af6 |
---|---|
1285 } | 1285 } |
1286 | 1286 |
1287 if (gc == NULL) | 1287 if (gc == NULL) |
1288 return "Not connected to AIM"; | 1288 return "Not connected to AIM"; |
1289 | 1289 |
1290 /* aim://goim?screenname=screenname&message=message */ | 1290 /* aim:goim?screenname=screenname&message=message */ |
1291 if (!g_strncasecmp(uri, "aim://goim?", strlen("aim://goim?"))) { | 1291 if (!g_strncasecmp(uri, "aim:goim?", strlen("aim:goim?"))) { |
1292 char *who, *what; | 1292 char *who, *what; |
1293 struct conversation *c; | 1293 struct conversation *c; |
1294 uri = uri + strlen("aim://goim?"); | 1294 uri = uri + strlen("aim:goim?"); |
1295 | 1295 |
1296 if (!(who = strstr(uri, "screenname="))) { | 1296 if (!(who = strstr(uri, "screenname="))) { |
1297 return "No screenname given."; | 1297 return "No screenname given."; |
1298 } | 1298 } |
1299 /* spaces are encoded as +'s */ | 1299 /* spaces are encoded as +'s */ |
1324 int finish; | 1324 int finish; |
1325 gtk_editable_insert_text(GTK_EDITABLE(c->entry), | 1325 gtk_editable_insert_text(GTK_EDITABLE(c->entry), |
1326 what, strlen(what), &finish); | 1326 what, strlen(what), &finish); |
1327 g_free(what); | 1327 g_free(what); |
1328 } | 1328 } |
1329 } else if (!g_strncasecmp(uri, "aim://addbuddy?", strlen("aim://addbuddy?"))) { | 1329 } else if (!g_strncasecmp(uri, "aim:addbuddy?", strlen("aim:addbuddy?"))) { |
1330 char *who, *group; | 1330 char *who, *group; |
1331 uri = uri + strlen("aim://addbuddy?"); | 1331 uri = uri + strlen("aim:addbuddy?"); |
1332 /* spaces are encoded as +'s */ | 1332 /* spaces are encoded as +'s */ |
1333 | 1333 |
1334 if (!(who = strstr(uri, "screenname="))) { | 1334 if (!(who = strstr(uri, "screenname="))) { |
1335 return "No screenname given."; | 1335 return "No screenname given."; |
1336 } | 1336 } |
1357 debug_printf("who: %s\n", who); | 1357 debug_printf("who: %s\n", who); |
1358 show_add_buddy(gc, who, group, NULL); | 1358 show_add_buddy(gc, who, group, NULL); |
1359 g_free(who); | 1359 g_free(who); |
1360 if (group) | 1360 if (group) |
1361 g_free(group); | 1361 g_free(group); |
1362 } else if (!g_strncasecmp(uri, "aim://gochat?", strlen("aim://gochat?"))) { | 1362 } else if (!g_strncasecmp(uri, "aim:gochat?", strlen("aim:gochat?"))) { |
1363 char *room; | 1363 char *room; |
1364 GList *chat=NULL; | 1364 GList *chat=NULL; |
1365 int exch = 5; | 1365 int exch = 5; |
1366 | 1366 |
1367 uri = uri + strlen("aim://gochat?"); | 1367 uri = uri + strlen("aim:gochat?"); |
1368 /* spaces are encoded as +'s */ | 1368 /* spaces are encoded as +'s */ |
1369 | 1369 |
1370 if (!(room = strstr(uri, "roomname="))) { | 1370 if (!(room = strstr(uri, "roomname="))) { |
1371 return "No roomname given."; | 1371 return "No roomname given."; |
1372 } | 1372 } |