# HG changeset patch
# User Sadrul Habib Chowdhury <imadil@gmail.com>
# Date 1212122024 0
# Node ID 996c80ab3dbc9492e195cd0545d0f6d72621a1cd
# Parent  228d576a7dd7eab64e6ef753fff38f02a11f5acc
Remove an unnecessary strdup when sending messages over IRC.

diff -r 228d576a7dd7 -r 996c80ab3dbc libpurple/protocols/irc/parse.c
--- a/libpurple/protocols/irc/parse.c	Fri May 30 01:51:43 2008 +0000
+++ b/libpurple/protocols/irc/parse.c	Fri May 30 04:33:44 2008 +0000
@@ -232,7 +232,7 @@
 
 	if (encodings[0] == NULL || !g_ascii_strcasecmp("UTF-8", encodings[0])) {
 		g_strfreev(encodings);
-		return g_strdup(string);
+		return NULL;
 	}
 
 	utf8 = g_convert(string, strlen(string), encodings[0], "UTF-8", NULL, NULL, &err);
@@ -597,7 +597,7 @@
 		case 'n':
 		case 'c':
 			tmp = irc_send_convert(irc, tok);
-			g_string_append(string, tmp);
+			g_string_append(string, tmp ? tmp : tok);
 			g_free(tmp);
 			break;
 		default: