diff src/protocols/irc/cmds.c @ 10609:6239870efd8e

[gaim-migrate @ 12055] Two-argument whois from rlaager, ported forward from oldstatus committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Fri, 18 Feb 2005 04:22:53 +0000
parents cdeb727d1de3
children c4cb90065e1d
line wrap: on
line diff
--- a/src/protocols/irc/cmds.c	Thu Feb 17 17:37:59 2005 +0000
+++ b/src/protocols/irc/cmds.c	Fri Feb 18 04:22:53 2005 +0000
@@ -503,10 +503,16 @@
 	if (!args || !args[0])
 		return 0;
 
-	buf = irc_format(irc, "vn", "WHOIS", args[0]);
+	if (args[1]) {
+		buf = irc_format(irc, "vvn", "WHOIS", args[0], args[1]);
+		irc->whois.nick = g_strdup(args[1]);
+	} else {
+		buf = irc_format(irc, "vn", "WHOIS", args[0]);
+		irc->whois.nick = g_strdup(args[0]);
+	}
+
 	irc_send(irc, buf);
 	g_free(buf);
-	irc->whois.nick = g_strdup(args[0]);
 
 	return 0;
 }