Mercurial > pidgin
diff src/gaim-remote.c @ 10395:b4b9dabdd7c7
[gaim-migrate @ 11624]
Some whitespace fixes, a compile warning fix, and add a "logout" option
to gaim-remote
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 17 Dec 2004 23:30:38 +0000 |
parents | 1a91e814e9d8 |
children |
line wrap: on
line diff
--- a/src/gaim-remote.c Fri Dec 17 00:05:32 2004 +0000 +++ b/src/gaim-remote.c Fri Dec 17 23:30:38 2004 +0000 @@ -65,7 +65,7 @@ * * If channel is 1, the message is printed to stdout. * if channel is 2, the message is printed to stderr. - */ + */ static void message(char *text, int channel) { @@ -103,11 +103,13 @@ text = g_strdup_printf(_("Usage: %s command [OPTIONS] [URI]\n\n" " COMMANDS:\n" + " send Send message\n" " uri Handle AIM: URI\n" " away Popup the away dialog with the default message\n" " back Remove the away dialog\n" - " send Send message\n" - " quit Close running copy of Gaim\n\n" + " logout Log out all accounts\n" + " quit Close running copy of Gaim\n" + "\n" " OPTIONS:\n" " -m, --message=MESG Message to send or show in conversation window\n" " -t, --to=SCREENNAME Select a target for command\n" @@ -307,6 +309,10 @@ "...prompts you to add 'Penguin' to your buddy list.\n"), 1); } + else if (!strcmp(command, "logout")) { + message(_("\nLog out all accounts\n"), 1); + } + else if (!strcmp(command, "quit")) { message(_("\nClose running copy of Gaim\n"), 1); } @@ -370,6 +376,13 @@ return send_generic_command(CUI_TYPE_USER, CUI_USER_BACK); } + else if (!strcmp(opts.command, "logout")) { + if (opts.help) + show_longhelp(argv[0], "logout"); + else + return send_generic_command(CUI_TYPE_USER, CUI_USER_LOGOUT); + } + else if (!strcmp(opts.command, "quit")) { if (opts.help) show_longhelp(argv[0], "quit"); @@ -381,6 +394,6 @@ show_remote_usage(argv[0]); return 1; } - + return 0; }