diff src/server.c @ 1006:0a4d0ed65e17

[gaim-migrate @ 1016] wow, configurable sounds. this should be neat. too bad the UI isn't done yet. but at least you can have them configured. oh yeah, this means we don't need gaim.soundlist anymore, since i removed the option to go through gnome for sounds. (there were only two advantages to having them go through gnome, and making them configurable was the primary one). anyway, i also changed some of the installation script stuff so that now everything (including the panel) should go through the $(whateverdir) makefile variables, so it should be easier to make packages in chrooted environments committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 19 Oct 2000 10:42:46 +0000
parents 1d8f05ea6bdf
children 966845e5ad29
line wrap: on
line diff
--- a/src/server.c	Thu Oct 19 00:59:20 2000 +0000
+++ b/src/server.c	Thu Oct 19 10:42:46 2000 +0000
@@ -144,7 +144,7 @@
 	 * the buddy list/UI needs to be really changed before this gets fixed*/
 	struct gaim_connection *g = connections->data;
 
-	if (g->prpl && g->prpl->get_info)
+	if (g && g->prpl && g->prpl->get_info)
 		(*g->prpl->get_info)(g, name);
 }
 
@@ -153,7 +153,7 @@
 	/* FIXME: see the serv_get_info comment above :-P */
 	struct gaim_connection *g = connections->data;
 
-	if (g->prpl && g->prpl->get_info)
+	if (g && g->prpl && g->prpl->get_info)
 		(*g->prpl->get_away_msg)(g, name);
 }
 
@@ -162,7 +162,7 @@
 	/* FIXME: see the serv_get_info comment above :-P */
 	struct gaim_connection *g = connections->data;
 
-	if (g->prpl && g->prpl->get_dir)
+	if (g && g->prpl && g->prpl->get_dir)
 		(*g->prpl->get_dir)(g, name);
 }
 
@@ -172,7 +172,7 @@
 	/* FIXME */
 	struct gaim_connection *g = connections->data;
 
-	if (g->prpl && g->prpl->set_dir)
+	if (g && g->prpl && g->prpl->set_dir)
 		(*g->prpl->set_dir)(g, first, middle, last, maiden, city, state, country, web);
 }
 
@@ -182,7 +182,7 @@
 	/* FIXME */
 	struct gaim_connection *g = connections->data;
 
-	if (g->prpl && g->prpl->dir_search)
+	if (g && g->prpl && g->prpl->dir_search)
 		(*g->prpl->dir_search)(g, first, middle, last, maiden, city, state, country, email);
 }
 
@@ -277,7 +277,7 @@
 {
 	/* FIXME */
 	struct gaim_connection *g = connections->data;
-	if (g->protocol == PROTO_TOC) {
+	if (g && g->protocol == PROTO_TOC) {
 		char buf[MSG_LEN];
 		int at;
 		GList *list;
@@ -392,7 +392,7 @@
 {
 	/* FIXME */
 	struct gaim_connection *g = connections->data;
-	if (g->protocol == PROTO_TOC) {
+	if (g && g->protocol == PROTO_TOC) {
 		char *buf = g_malloc(BUF_LONG);
 		char *buf2 = g_malloc(MSG_LEN);
 		serv_build_config(buf, BUF_LONG / 2, FALSE);
@@ -486,7 +486,7 @@
 		}
 		if (cnv != NULL) {
 			if (sound_options & OPT_SOUND_WHEN_AWAY)
-				play_sound(AWAY);
+				play_sound(RECEIVE);
 			write_to_conv(cnv, message, away | WFLAG_RECV, NULL);
 		}