changeset 24154:b3ab1c23cdf6

Register the /buzz command using PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS. This way, we don't have to register the command again with arguments Removed an unused variable in jabber.c
author Marcus Lundblad <ml@update.uu.se>
date Sun, 19 Oct 2008 21:45:39 +0000
parents a64d90cff01f
children de3e32bb942a
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Sun Oct 12 17:38:32 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sun Oct 19 21:45:39 2008 +0000
@@ -2351,7 +2351,6 @@
 {
 	JabberStream *js = conv->account->gc->proto_data;
 	const gchar *who;
-	gboolean result;
 	
 	if (!args || !args[0]) {
 		/* use the buddy from conversation, if it's a one-to-one conversation */
@@ -2477,12 +2476,9 @@
 					  "prpl-jabber", jabber_cmd_ping,
 					  _("ping &lt;jid&gt;:	Ping a user/component/server."),
 					  NULL);
-	purple_cmd_register("buzz", "s", PURPLE_CMD_P_PRPL,
-					  PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY,
-					  "prpl-jabber", jabber_cmd_buzz,
-					  _("buzz: Buzz a user to get their attention"), NULL);
-	purple_cmd_register("buzz", "", PURPLE_CMD_P_PRPL,
-					  PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY,
+	purple_cmd_register("buzz", "w", PURPLE_CMD_P_PRPL,
+					  PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY | 
+					  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS,
 					  "prpl-jabber", jabber_cmd_buzz,
 					  _("buzz: Buzz a user to get their attention"), NULL);
 }