diff libpurple/protocols/irc/cmds.c @ 30643:91869ed3ba59

Fixes non-ASCII arguments to /mode, /umode, etc. Thanks to Max Ulidtko for this patch. Fixes #12207 committer: Ethan Blanton <elb@pidgin.im>
author ulidtko@gmail.com
date Tue, 22 Jun 2010 01:40:18 +0000
parents 367570a961f0
children a8cc50c2279f
line wrap: on
line diff
--- a/libpurple/protocols/irc/cmds.c	Sun Jun 20 17:51:31 2010 +0000
+++ b/libpurple/protocols/irc/cmds.c	Tue Jun 22 01:40:18 2010 +0000
@@ -238,16 +238,16 @@
 		if (!args[0] && irc_ischannel(target))
 			buf = irc_format(irc, "vc", "MODE", target);
 		else if (args[0] && (*args[0] == '+' || *args[0] == '-'))
-			buf = irc_format(irc, "vcv", "MODE", target, args[0]);
+			buf = irc_format(irc, "vcn", "MODE", target, args[0]);
 		else if (args[0])
-			buf = irc_format(irc, "vv", "MODE", args[0]);
+			buf = irc_format(irc, "vn", "MODE", args[0]);
 		else
 			return 0;
 	} else if (!strcmp(cmd, "umode")) {
 		if (!args[0])
 			return 0;
 		gc = purple_account_get_connection(irc->account);
-		buf = irc_format(irc, "vnv", "MODE", purple_connection_get_display_name(gc), args[0]);
+		buf = irc_format(irc, "vnc", "MODE", purple_connection_get_display_name(gc), args[0]);
 	} else {
 		return 0;
 	}
@@ -437,7 +437,7 @@
 	if (!args || !args[0])
 		return 0;
 
-	buf = irc_format(irc, "v", args[0]);
+	buf = irc_format(irc, "n", args[0]);
 	irc_send(irc, buf);
 	g_free(buf);