annotate src/gaim-remote.c @ 9944:e4a27c9aec4c

[gaim-migrate @ 10838] with much rejoicing, and massive thanks to the efforts of Christian, and all who have helped him, I present to you the incomplete status rewrite! committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 03 Sep 2004 21:35:52 +0000
parents 8793c7127c80
children 33431f91e4a8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /*
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * gaim-remote
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7724
diff changeset
4 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7724
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7724
diff changeset
6 * source distribution.
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 *
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * (at your option) any later version.
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 *
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * GNU General Public License for more details.
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 *
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 *
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 */
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
24 #include "internal.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
25
3533
6c32036050cf [gaim-migrate @ 3607]
Sean Egan <seanegan@gmail.com>
parents: 3480
diff changeset
26 #include <getopt.h>
5859
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
27
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
28 #include <gaim-remote/remote.h>
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
4242
cf19d8102b34 [gaim-migrate @ 4492]
Luke Schierer <lschiere@pidgin.im>
parents: 4235
diff changeset
30 /*To be implemented:
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 " info Show information about connected accounts\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 " list Print buddy list\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 " ison Show presence state of your buddy\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 " convo Open a new conversation window\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 " send Send message\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 " add Add buddy to buddy list\n"
3559
119b8950a1c8 [gaim-migrate @ 3653]
Sean Egan <seanegan@gmail.com>
parents: 3533
diff changeset
37 " remove Remove buddy from list\n"
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 " -m, --message=MESG Message to send or show in conversation window\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 " -t, --to=SCREENNAME Select a target for command\n"
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 " -p, --protocol=PROTO Specify protocol to use\n"
8154
064ecf11a36a [gaim-migrate @ 8866]
Mark Doliner <mark@kingant.net>
parents: 8152
diff changeset
41 " -f, --from=SCREENNAME Specify screen name to use\n"
4242
cf19d8102b34 [gaim-migrate @ 4492]
Luke Schierer <lschiere@pidgin.im>
parents: 4235
diff changeset
42 " -q, --quiet Send message without showing a conversation\n"
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 " window\n"
4242
cf19d8102b34 [gaim-migrate @ 4492]
Luke Schierer <lschiere@pidgin.im>
parents: 4235
diff changeset
44 */
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 static struct option longopts[] = {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 {"message", required_argument, NULL, 'm'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 {"to", required_argument, NULL, 't'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 {"protocol",required_argument, NULL, 'p'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50 {"from", required_argument, NULL, 'f'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 {"quiet", no_argument, NULL, 'q'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 {"help", no_argument, NULL, 'h'},
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 {0,0,0,0}
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 };
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 struct remoteopts {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 char *command;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 char *uri;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 gboolean help, quiet;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 char *message, *to, *from;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 int protocol;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 };
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
63 struct remoteopts opts;
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
65 /*
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
66 * Prints a message to the terminal/shell/console.
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
67 * We try to convert "text" from UTF-8 to the user's locale.
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
68 * If that fails then UTF-8 is used as a fallback.
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
69 *
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
70 * If channel is 1, the message is printed to stdout.
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
71 * if channel is 2, the message is printed to stderr.
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
72 */
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
73 static void
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
74 message(char *text, int channel)
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
75 {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
76 char *text_conv = NULL,*text_output;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
77 GError *error = NULL;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
78
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
79 text_conv = g_locale_from_utf8(text, -1, NULL, NULL, &error);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
80
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
81 if (text_conv == NULL) {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
82 g_warning("%s\n", error->message);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
83 g_error_free(error);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
84 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
85
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
86 text_output = (text_conv ? text_conv : text);
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
88 switch (channel) {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
89 case 1:
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
90 puts(text_output);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
91 break;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
92 case 2:
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
93 fputs(text_output, stderr);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
94 break;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
95 default:
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
96 break;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
97 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
98
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
99 if (text_conv)
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
100 g_free(text_conv);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
101 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
102
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
103 static void
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
104 show_remote_usage(const char *name)
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
105 {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
106 char *text = NULL;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
107
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
108 text = g_strdup_printf(_("Usage: %s command [OPTIONS] [URI]\n\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
109 " COMMANDS:\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
110 " uri Handle AIM: URI\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
111 " away Popup the away dialog with the default message\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
112 " back Remove the away dialog\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
113 " quit Close running copy of Gaim\n\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
114 " OPTIONS:\n"
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
115 " -h, --help [command] Show help for command\n"), name);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
116
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
117 message(text, 1);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
118 g_free(text);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
119
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
120 return;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
121 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
122
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
123 int
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
124 get_options(int argc, char *argv[])
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 int i;
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
127
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 memset(&opts, 0, sizeof(opts));
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 opts.protocol = -1;
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
130
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 while ((i=getopt_long(argc, argv, "m:t:p:f:qh", longopts, NULL)) != -1) {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 switch (i) {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 case 'm':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 opts.message = optarg;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 case 't':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 opts.to = optarg;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 case 'p':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 /* Do stuff here. */
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 case 'f':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 opts.from = optarg;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 case 'q':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 opts.quiet = TRUE;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 case 'h':
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 opts.help = TRUE;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 break;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 }
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 }
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 /* We must have non getopt'ed argument-- the command */
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 if (optind < argc)
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156 opts.command = g_strdup(argv[optind++]);
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 else
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 return 1;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
160 if (opts.help)
6643
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
161 return 0;
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
162
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 /* And we can have another argument--the URI. */
6643
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
164 /* but only if we're using the uri command. */
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
165 if (!strcmp(opts.command, "uri")) {
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
166 if (argc-optind == 1)
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
167 opts.uri = g_strdup(argv[optind++]);
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 else
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 return 1;
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
170 } else if (optind == argc)
6643
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
171 return 0;
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
172 else
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
173 return 1;
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
174
0dfe02111e20 [gaim-migrate @ 7168]
Luke Schierer <lschiere@pidgin.im>
parents: 5872
diff changeset
175 return 0;
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 }
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
178 static int
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
179 send_generic_command(guchar type, guchar subtype) {
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 int fd = 0;
5859
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
181 GaimRemotePacket *p = NULL;
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
182
5859
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
183 fd = gaim_remote_session_connect(0);
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
184 if (fd < 0) {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
185 message(_("Gaim not running (on session 0)\nIs the \"Remote Control\" plugin loaded?\n"), 2);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
186 return 1;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
187 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
188 p = gaim_remote_packet_new(type, subtype);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
189 gaim_remote_session_send_packet(fd, p);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
190 close(fd);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
191 gaim_remote_packet_free(p);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
192
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
193 return 0;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
194 }
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
195
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
196 static int
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
197 send_command_uri() {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
198 int fd = 0;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
199 GaimRemotePacket *p = NULL;
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
200
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
201 fd = gaim_remote_session_connect(0);
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
202 if (fd < 0) {
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
203 message(_("Gaim not running (on session 0)\nIs the \"Remote Control\" plugin loaded?\n"), 2);
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
204 return 1;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
205 }
5859
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
206 p = gaim_remote_packet_new(CUI_TYPE_REMOTE, CUI_REMOTE_URI);
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
207 gaim_remote_packet_append_string(p, opts.uri);
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
208 gaim_remote_session_send_packet(fd, p);
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
209 close(fd);
5859
022786c7ab53 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents: 5124
diff changeset
210 gaim_remote_packet_free(p);
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
211
3559
119b8950a1c8 [gaim-migrate @ 3653]
Sean Egan <seanegan@gmail.com>
parents: 3533
diff changeset
212 return 0;
119b8950a1c8 [gaim-migrate @ 3653]
Sean Egan <seanegan@gmail.com>
parents: 3533
diff changeset
213 }
119b8950a1c8 [gaim-migrate @ 3653]
Sean Egan <seanegan@gmail.com>
parents: 3533
diff changeset
214
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
215 static void
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
216 show_longhelp( char *name, char *command)
9608
204f5d66a863 [gaim-migrate @ 10451]
Luke Schierer <lschiere@pidgin.im>
parents: 9184
diff changeset
217 {
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
218 if (!strcmp(command, "uri")) {
7724
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
219 message(_("\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
220 "Using AIM: URIs:\n"
8152
82aeed3c90f0 [gaim-migrate @ 8864]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
221 "Sending an IM to a screen name:\n"
7724
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
222 " gaim-remote uri 'aim:goim?screenname=Penguin&message=hello+world'\n"
8152
82aeed3c90f0 [gaim-migrate @ 8864]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
223 "In this case, 'Penguin' is the screen name we wish to IM, and 'hello world'\n"
7724
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
224 "is the message to be sent. '+' must be used in place of spaces.\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
225 "Please note the quoting used above - if you run this from a shell the '&'\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
226 "needs to be escaped, or the command will stop at that point.\n"
8152
82aeed3c90f0 [gaim-migrate @ 8864]
Mark Doliner <mark@kingant.net>
parents: 8046
diff changeset
227 "Also,the following will just open a conversation window to a screen name,\n"
7724
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
228 "with no message:\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
229 " gaim-remote uri 'aim:goim?screenname=Penguin'\n\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
230 "Joining a chat:\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
231 " gaim-remote uri 'aim:gochat?roomname=PenguinLounge'\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
232 "...joins the 'PenguinLounge' chat room.\n\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
233 "Adding a buddy to your buddy list:\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
234 " gaim-remote uri 'aim:addbuddy?screenname=Penguin'\n"
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
235 "...prompts you to add 'Penguin' to your buddy list.\n"), 1);
5116
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
236 }
9695
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
237
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
238 else if (!strcmp(command, "quit")) {
7724
613b20c69d2c [gaim-migrate @ 8369]
Luke Schierer <lschiere@pidgin.im>
parents: 6643
diff changeset
239 message(_("\nClose running copy of Gaim\n"), 1);
5116
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
240 }
9695
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
241
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
242 else if (!strcmp(command, "away")) {
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
243 message(_("\nMark all accounts as \"away\" with the default message.\n"), 1);
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
244 }
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
245
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
246 else if (!strcmp(command, "back")) {
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
247 message(_("\nSet all accounts as not away.\n"), 1);
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
248 }
89110d3665df [gaim-migrate @ 10550]
Mark Doliner <mark@kingant.net>
parents: 9674
diff changeset
249
5116
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
250 else {
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
251 show_remote_usage(name);
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
252 }
4242
cf19d8102b34 [gaim-migrate @ 4492]
Luke Schierer <lschiere@pidgin.im>
parents: 4235
diff changeset
253 }
cf19d8102b34 [gaim-migrate @ 4492]
Luke Schierer <lschiere@pidgin.im>
parents: 4235
diff changeset
254
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
255 int main(int argc, char *argv[])
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
256 {
5116
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
257 #ifdef ENABLE_NLS
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
258 setlocale (LC_ALL, "");
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
259 bindtextdomain(PACKAGE, LOCALEDIR);
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
260 bind_textdomain_codeset(PACKAGE, "UTF-8");
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
261 textdomain(PACKAGE);
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
262 #endif
c081a81ee013 [gaim-migrate @ 5479]
Luke Schierer <lschiere@pidgin.im>
parents: 4242
diff changeset
263
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264 if (get_options(argc, argv)) {
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
265 show_remote_usage(argv[0]);
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 return 0;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
267 }
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
268
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
269 if (!strcmp(opts.command, "uri")) {
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
270 if (opts.help)
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
271 show_longhelp(argv[0], "uri");
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
272 else
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
273 return send_command_uri();
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
274 }
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
275
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
276 else if (!strcmp(opts.command, "away")) {
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
277 if (opts.help)
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
278 show_longhelp(argv[0], "away");
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
279 else
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
280 return send_generic_command(CUI_TYPE_USER, CUI_USER_AWAY);
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
281 }
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
282
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
283 else if (!strcmp(opts.command, "back")) {
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
284 if (opts.help)
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
285 show_longhelp(argv[0], "back");
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
286 else
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
287 return send_generic_command(CUI_TYPE_USER, CUI_USER_BACK);
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
288 }
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
289
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
290 else if (!strcmp(opts.command, "quit")) {
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
291 if (opts.help)
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
292 show_longhelp(argv[0], "quit");
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
293 else
9752
8793c7127c80 [gaim-migrate @ 10619]
Mark Doliner <mark@kingant.net>
parents: 9695
diff changeset
294 return send_generic_command(CUI_TYPE_META, CUI_META_QUIT);
9674
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
295 }
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
296
a049733e41f3 [gaim-migrate @ 10526]
Mark Doliner <mark@kingant.net>
parents: 9608
diff changeset
297 else {
3480
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
298 show_remote_usage(argv[0]);
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
299 return 1;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
300 }
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
301
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
302 return 0;
fc28f412e74d [gaim-migrate @ 3534]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
303 }