comparison src/protocols/irc/irc.c @ 10504:1a97d5e88d12

[gaim-migrate @ 11796] Lots of things here: - Several memory leak fixes - A few invalid memory access fixes - Fix a yahoo crash going idle when away - Fix Add user in chats to actually fill in the screenname - Add gaim_account_{get,set}_enabled to perl - Fix command priorities (fixes /me in IRC) - Fix MSN notification server transfer to be quiet about it - Fix MSN blist sync if user has insane friendly name - Make the docklet less crash-happy if it fails to embed in 3 seconds - Only probe for native plugins with the correct file extension - 1 typo fix :) ... and quite possibly something else I forgot. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 11 Jan 2005 17:25:06 +0000
parents 93dab54c7bb6
children 761822c6f7ca
comparison
equal deleted inserted replaced
10503:776586d647e3 10504:1a97d5e88d12
397 } 397 }
398 if (irc->timer) 398 if (irc->timer)
399 gaim_timeout_remove(irc->timer); 399 gaim_timeout_remove(irc->timer);
400 g_hash_table_destroy(irc->cmds); 400 g_hash_table_destroy(irc->cmds);
401 g_hash_table_destroy(irc->msgs); 401 g_hash_table_destroy(irc->msgs);
402 g_hash_table_destroy(irc->buddies);
402 if (irc->motd) 403 if (irc->motd)
403 g_string_free(irc->motd, TRUE); 404 g_string_free(irc->motd, TRUE);
404 g_free(irc->server); 405 g_free(irc->server);
405 g_free(irc); 406 g_free(irc);
406 } 407 }
433 GaimConnection *gc = gaim_account_get_connection(account); 434 GaimConnection *gc = gaim_account_get_connection(account);
434 struct irc_conn *irc = gc->proto_data; 435 struct irc_conn *irc = gc->proto_data;
435 const char *args[1]; 436 const char *args[1];
436 const char *status_id = gaim_status_get_id(status); 437 const char *status_id = gaim_status_get_id(status);
437 438
439 if (!gaim_status_is_active(status))
440 return;
441
442 args[0] = NULL;
443
438 if (!strcmp(status_id, "away")) 444 if (!strcmp(status_id, "away"))
439 args[0] = gaim_status_get_attr_string(status, "message"); 445 args[0] = gaim_status_get_attr_string(status, "message");
440 else if (!strcmp(status_id, "available"))
441 args[0] = NULL;
442 446
443 irc_cmd_away(irc, "away", NULL, args); 447 irc_cmd_away(irc, "away", NULL, args);
444 } 448 }
445 449
446 static void irc_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) 450 static void irc_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)