Mercurial > pidgin.yaz
changeset 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 | 48cc2d81ddbb |
children | babea41afa7e |
files | plugins/irc.c src/prefs.c src/sound.c src/util.c |
diffstat | 4 files changed, 9 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/irc.c Thu Dec 14 13:26:11 2000 +0000 +++ b/plugins/irc.c Thu Dec 14 13:32:10 2000 +0000 @@ -379,6 +379,7 @@ } while (buf[i++] != '\n'); buf[--i] = '\0'; + g_print("%s\n", buf); /* Check for errors */ @@ -388,7 +389,7 @@ gchar *u_errormsg; /* Let's get our error message */ - u_errormsg = strdup(buf + 7); + u_errormsg = g_strdup(buf + 7); /* We got our error message. Now, let's reaise an * error dialog */ @@ -396,7 +397,7 @@ do_error_dialog(u_errormsg, "Gaim: IRC Error"); /* And our necessary garbage collection */ - free(u_errormsg); + g_free(u_errormsg); } /* Parse the list of names that we receive when we first sign on to @@ -453,16 +454,8 @@ /* Now that we've parsed the hell out of this big * mess, let's try to split up the names properly */ - for (i = 0; buf2[i] != NULL; i++) { - /* We shouldnt play with ourselves */ - if (g_strcasecmp(buf2[i], gc->username) != 0) { - /* Add the person to the list */ - - /* FIXME: These really should be in alphabetical order and OPS and Voice first */ - - add_chat_buddy(convo, buf2[i]); - } - } + for (i = 0; buf2[i] != NULL; i++) + add_chat_buddy(convo, buf2[i]); /* And free our pointers */ g_strfreev(buf2); @@ -957,9 +950,8 @@ if (bud_list_cache_exists(gc)) do_import(NULL, gc); + /* we don't call this now because otherwise some IRC servers might not like us */ idata->timer = gtk_timeout_add(20000, (GtkFunction)irc_request_buddy_update, gc); - - irc_request_buddy_update(gc); } static void irc_login(struct aim_user *user)
--- a/src/prefs.c Thu Dec 14 13:26:11 2000 +0000 +++ b/src/prefs.c Thu Dec 14 13:32:10 2000 +0000 @@ -1964,7 +1964,7 @@ gtk_text_insert(GTK_TEXT(dw->entry), NULL, NULL, NULL, s, -1); #ifdef DEBUG - printf("%s", s); + g_print("%s", s); #endif g_free(s); }
--- a/src/sound.c Thu Dec 14 13:26:11 2000 +0000 +++ b/src/sound.c Thu Dec 14 13:32:10 2000 +0000 @@ -312,8 +312,7 @@ return; else if (pid == 0) { if (sound_options & OPT_SOUND_BEEP) { - printf("\a"); - fflush(stdout); + g_print("\a"); _exit(0); } @@ -363,8 +362,7 @@ return; else if (pid == 0) { if (sound_options & OPT_SOUND_BEEP) { - printf("\a"); - fflush(stdout); + g_print("\a"); _exit(0); } #ifdef ESD_SOUND
--- a/src/util.c Thu Dec 14 13:26:11 2000 +0000 +++ b/src/util.c Thu Dec 14 13:32:10 2000 +0000 @@ -1153,13 +1153,11 @@ if (name !=NULL) { /* list of names given */ names = g_strsplit(name, ",", 32); for (n = names; *n != NULL; n++) { - printf("user %s...\n", *n); u = find_user(*n, -1); if (u) { /* found a user */ if (first == NULL) first = g_strdup(*n); if (u->options & OPT_USR_REM_PASS) { - printf("got user %s\n", *n); retval = 0; serv_login(u); }