changeset 22470:0daeabc1a185

merge of '1a03b83dbe8f941cb6de4ed3659bf7b2335d642d' and 'bda22ced802132e741a614cf3e67a599e9b08b0c'
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 13 Mar 2008 01:24:51 +0000
parents dc599fcdac8d (current diff) 22fce0be8ed0 (diff)
children f693749f82d2
files
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/joinpart.c	Thu Mar 13 01:23:00 2008 +0000
+++ b/libpurple/plugins/joinpart.c	Thu Mar 13 01:24:51 2008 +0000
@@ -77,7 +77,7 @@
 {
 	PurpleConvChat *chat;
 	int threshold;
-	struct joinpart_key *key;
+	struct joinpart_key key;
 	time_t *last_said;
 
 	g_return_val_if_fail(conv != NULL, FALSE);
@@ -94,10 +94,9 @@
 		return FALSE;
 
 	/* Only show the notice if the user has spoken recently. */
-	key = g_new(struct joinpart_key, 1);
-	key->conv = conv;
-	key->user = g_strdup(name);
-	last_said = g_hash_table_lookup(users, key);
+	key.conv = conv;
+	key.user = (gchar *)name;
+	last_said = g_hash_table_lookup(users, &key);
 	if (last_said != NULL)
 	{
 		int delay = purple_prefs_get_int(DELAY_PREF);