changeset 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 c2c61981f98d
children d0b0f0d17046 c7fa7c7aca7d
files COPYRIGHT ChangeLog libpurple/protocols/irc/cmds.c
diffstat 3 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sun Jun 20 17:51:31 2010 +0000
+++ b/COPYRIGHT	Tue Jun 22 01:40:18 2010 +0000
@@ -512,6 +512,7 @@
 Kyle Turman
 Jon Turney
 Junichi Uekawa
+Max Ulidtko
 Igor Vlasenko
 István Váradi
 Martijn van Beers
--- a/ChangeLog	Sun Jun 20 17:51:31 2010 +0000
+++ b/ChangeLog	Tue Jun 22 01:40:18 2010 +0000
@@ -13,6 +13,9 @@
 	* Rebindable 'dropdown' action for comboboxes (GntComboBox) to show the
 	  dropdown list of options.
 
+	IRC:
+	* Fix non-ASCII arguments to /mode et al.  (thanks to Max Ulidtko)
+
 	XMPP:
 	* Allow connecting to servers that only advertise GSSAPI and expect
 	  a fallback to legacy IQ authentication (broken in 2.7.0).
--- 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);