cpw.malu.xmpp.attention: 7d61237e: Register the /buzz command using PURPLE_..

malu at pidgin.im malu at pidgin.im
Sun Oct 19 17:50:24 EDT 2008


-----------------------------------------------------------------
Revision: 7d61237e0ffb6113b3c1286311b584034a870b19
Ancestor: 62b78e9093c7b054a98175b8211ac321c9b50756
Author: malu at pidgin.im
Date: 2008-10-19T21:45:39
Branch: im.pidgin.cpw.malu.xmpp.attention
URL: http://d.pidgin.im/viewmtn/revision/info/7d61237e0ffb6113b3c1286311b584034a870b19

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	cf552862fc4b6e5e35d276246ff48d6239af0d3e
+++ libpurple/protocols/jabber/jabber.c	b5024fc1773851f991d9c4a19af27375995ac32e
@@ -2351,7 +2351,6 @@ static PurpleCmdRet jabber_cmd_buzz(Purp
 {
 	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,14 +2476,11 @@ void jabber_register_commands(void)
 					  "prpl-jabber", jabber_cmd_ping,
 					  _("ping <jid>:	Ping a user/component/server."),
 					  NULL);
-	purple_cmd_register("buzz", "s", 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);
-	purple_cmd_register("buzz", "", 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);
 }
 
 void


More information about the Commits mailing list