diff src/protocols/irc/irc.c @ 9754:4a8bf81b82ae

[gaim-migrate @ 10621] " This will default the room/server fields to the proper values when an add chat is requested from a conversation window. It wasn't quite as trivial as the reporter suggested..." --Nathan (noif) Fredrickson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 15 Aug 2004 19:34:20 +0000
parents b10d4c6ac7eb
children e74eb0d11f86
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Sun Aug 15 17:05:51 2004 +0000
+++ b/src/protocols/irc/irc.c	Sun Aug 15 19:34:20 2004 +0000
@@ -189,6 +189,18 @@
 	return m;
 }
 
+GHashTable *irc_chat_info_defaults(GaimConnection *gc, const char *chat_name)
+{
+	GHashTable *defaults;
+
+	defaults = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
+
+	if (chat_name != NULL)
+		g_hash_table_insert(defaults, "channel", g_strdup(chat_name));
+
+	return defaults;
+}
+
 static void irc_login(GaimAccount *account)
 {
 	GaimConnection *gc;
@@ -579,6 +591,7 @@
 	irc_away_states,		/* away_states */
 	NULL,					/* blist_node_menu */
 	irc_chat_join_info,		/* chat_info */
+	irc_chat_info_defaults,	/* chat_info_defaults */
 	irc_login,				/* login */
 	irc_close,				/* close */
 	irc_im_send,			/* send_im */