comparison libpurple/protocols/jabber/adhoccommands.c @ 18694:c72d2458b22e

Switched formatting of the ad-hoc commands to be less intimidating
author Andreas Monitzer <pidgin@monitzer.com>
date Mon, 16 Jul 2007 03:44:09 +0000
parents 54a5fbeadd7c
children 27fcb91ae08a
comparison
equal deleted inserted replaced
18693:f02902d2f00b 18694:c72d2458b22e
271 for(iter = jb->resources; iter; iter = g_list_next(iter)) { 271 for(iter = jb->resources; iter; iter = g_list_next(iter)) {
272 JabberBuddyResource *jbr = iter->data; 272 JabberBuddyResource *jbr = iter->data;
273 GList *riter; 273 GList *riter;
274 for(riter = jbr->commands; riter; riter = g_list_next(riter)) { 274 for(riter = jbr->commands; riter; riter = g_list_next(riter)) {
275 JabberAdHocCommands *cmd = riter->data; 275 JabberAdHocCommands *cmd = riter->data;
276 char *cmdname = g_strdup_printf("[%s] %s",jbr->name,cmd->name); 276 char *cmdname = g_strdup_printf("%s (%s)",cmd->name,jbr->name);
277 PurplePluginAction *act = purple_plugin_action_new(cmdname, jabber_adhoc_server_execute); 277 PurplePluginAction *act = purple_plugin_action_new(cmdname, jabber_adhoc_server_execute);
278 act->user_data = cmd; 278 act->user_data = cmd;
279 *m = g_list_append(*m, act); 279 *m = g_list_append(*m, act);
280 g_free(cmdname); 280 g_free(cmdname);
281 } 281 }
284 g_free(accountname); 284 g_free(accountname);
285 285
286 /* now add server commands */ 286 /* now add server commands */
287 for(cmdlst = js->commands; cmdlst; cmdlst = g_list_next(cmdlst)) { 287 for(cmdlst = js->commands; cmdlst; cmdlst = g_list_next(cmdlst)) {
288 JabberAdHocCommands *cmd = cmdlst->data; 288 JabberAdHocCommands *cmd = cmdlst->data;
289 char *cmdname = g_strdup_printf("[%s] %s",js->user->domain,cmd->name); 289 PurplePluginAction *act = purple_plugin_action_new(cmd->name, jabber_adhoc_server_execute);
290 PurplePluginAction *act = purple_plugin_action_new(cmdname, jabber_adhoc_server_execute);
291 act->user_data = cmd; 290 act->user_data = cmd;
292 *m = g_list_append(*m, act); 291 *m = g_list_append(*m, act);
293 g_free(cmdname); 292 }
294 } 293 }
295 }