changeset 3030:e40c30cf7572

[gaim-migrate @ 3043] Told you I should have looked it over better. It still has issues... I'll do them later. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 11 Mar 2002 06:14:46 +0000
parents 21895719464c
children eafd12638829
files src/protocols/irc/irc.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Mon Mar 11 04:41:12 2002 +0000
+++ b/src/protocols/irc/irc.c	Mon Mar 11 06:14:46 2002 +0000
@@ -1432,6 +1432,7 @@
 	struct dcc_chat *dccchat = find_dcc_chat(gc, who);
 	struct irc_data *id = gc->proto_data;
 	g_free(tmp);
+	what = str->str;
 	if (*what != '/') {
 		unsigned int max = 440 - strlen(who);
 		char t;
@@ -1439,30 +1440,30 @@
 			t = what[max];
 			what[max] = 0;
 			if (dccchat) {
-				g_snprintf(buf, sizeof(buf), "%s\r\n", str->str);
+				g_snprintf(buf, sizeof(buf), "%s\r\n", what);
 				irc_write(dccchat->fd, buf, strlen(buf));
 				g_string_free(str, TRUE);
 				return 1;
 			}
-			g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str);
+			g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what);
 			irc_write(id->fd, buf, strlen(buf));
 			what[max] = t;
 			what = what + max;
 		}
 		if (dccchat) {
-			g_snprintf(buf, sizeof(buf), "%s\r\n", str->str);
+			g_snprintf(buf, sizeof(buf), "%s\r\n", what);
 			irc_write(dccchat->fd, buf, strlen(buf));
 			g_string_free(str, TRUE);
 			return 1;
 		}
-		g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, str->str);
+		g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, what);
 		irc_write(id->fd, buf, strlen(buf));
 		g_string_free(str, TRUE);
 		return 1;
 	}
 	
 	what++;
-	process_data_init(pdibuf, str->str, word, word_eol, TRUE);
+	process_data_init(pdibuf, what, word, word_eol, TRUE);
 	g_string_free(str, TRUE);
 	if (!g_strcasecmp(pdibuf, "ME")) {
 		if (dccchat) {