Mercurial > pidgin
comparison plugins/irc.c @ 1269:677e2c9e8baf
[gaim-migrate @ 1279]
got rid of printf's (changed to g_print or removed), and in irc.c, made it so we can be in a chat room, and don't do the buddy list right away
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Thu, 14 Dec 2000 13:32:10 +0000 |
| parents | aac04affc65d |
| children | d8eaf65ca9c3 |
comparison
equal
deleted
inserted
replaced
| 1268:48cc2d81ddbb | 1269:677e2c9e8baf |
|---|---|
| 377 return; | 377 return; |
| 378 } | 378 } |
| 379 } while (buf[i++] != '\n'); | 379 } while (buf[i++] != '\n'); |
| 380 | 380 |
| 381 buf[--i] = '\0'; | 381 buf[--i] = '\0'; |
| 382 g_print("%s\n", buf); | |
| 382 | 383 |
| 383 /* Check for errors */ | 384 /* Check for errors */ |
| 384 | 385 |
| 385 if (((strstr(buf, "ERROR :") && (!strstr(buf, "PRIVMSG ")) && | 386 if (((strstr(buf, "ERROR :") && (!strstr(buf, "PRIVMSG ")) && |
| 386 (!strstr(buf, "NOTICE ")) && (strlen(buf) > 7)))) { | 387 (!strstr(buf, "NOTICE ")) && (strlen(buf) > 7)))) { |
| 387 | 388 |
| 388 gchar *u_errormsg; | 389 gchar *u_errormsg; |
| 389 | 390 |
| 390 /* Let's get our error message */ | 391 /* Let's get our error message */ |
| 391 u_errormsg = strdup(buf + 7); | 392 u_errormsg = g_strdup(buf + 7); |
| 392 | 393 |
| 393 /* We got our error message. Now, let's reaise an | 394 /* We got our error message. Now, let's reaise an |
| 394 * error dialog */ | 395 * error dialog */ |
| 395 | 396 |
| 396 do_error_dialog(u_errormsg, "Gaim: IRC Error"); | 397 do_error_dialog(u_errormsg, "Gaim: IRC Error"); |
| 397 | 398 |
| 398 /* And our necessary garbage collection */ | 399 /* And our necessary garbage collection */ |
| 399 free(u_errormsg); | 400 g_free(u_errormsg); |
| 400 } | 401 } |
| 401 | 402 |
| 402 /* Parse the list of names that we receive when we first sign on to | 403 /* Parse the list of names that we receive when we first sign on to |
| 403 * a channel */ | 404 * a channel */ |
| 404 | 405 |
| 451 } | 452 } |
| 452 | 453 |
| 453 /* Now that we've parsed the hell out of this big | 454 /* Now that we've parsed the hell out of this big |
| 454 * mess, let's try to split up the names properly */ | 455 * mess, let's try to split up the names properly */ |
| 455 | 456 |
| 456 for (i = 0; buf2[i] != NULL; i++) { | 457 for (i = 0; buf2[i] != NULL; i++) |
| 457 /* We shouldnt play with ourselves */ | 458 add_chat_buddy(convo, buf2[i]); |
| 458 if (g_strcasecmp(buf2[i], gc->username) != 0) { | |
| 459 /* Add the person to the list */ | |
| 460 | |
| 461 /* FIXME: These really should be in alphabetical order and OPS and Voice first */ | |
| 462 | |
| 463 add_chat_buddy(convo, buf2[i]); | |
| 464 } | |
| 465 } | |
| 466 | 459 |
| 467 /* And free our pointers */ | 460 /* And free our pointers */ |
| 468 g_strfreev(buf2); | 461 g_strfreev(buf2); |
| 469 | 462 |
| 470 return; | 463 return; |
| 955 serv_finish_login(gc); | 948 serv_finish_login(gc); |
| 956 | 949 |
| 957 if (bud_list_cache_exists(gc)) | 950 if (bud_list_cache_exists(gc)) |
| 958 do_import(NULL, gc); | 951 do_import(NULL, gc); |
| 959 | 952 |
| 953 /* we don't call this now because otherwise some IRC servers might not like us */ | |
| 960 idata->timer = gtk_timeout_add(20000, (GtkFunction)irc_request_buddy_update, gc); | 954 idata->timer = gtk_timeout_add(20000, (GtkFunction)irc_request_buddy_update, gc); |
| 961 | |
| 962 irc_request_buddy_update(gc); | |
| 963 } | 955 } |
| 964 | 956 |
| 965 static void irc_login(struct aim_user *user) | 957 static void irc_login(struct aim_user *user) |
| 966 { | 958 { |
| 967 int fd; | 959 int fd; |
