annotate src/oscar.c @ 411:a330017b3aa4

[gaim-migrate @ 421] Trying to make things compile cleanly committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 15 Jun 2000 05:27:25 +0000
parents 7c74e2f579b5
children ad08e67ec874
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 /*
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 * gaim
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4 * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 * libfaim code copyright 1998, 1999 Adam Fritzler <afritz@auk.cx>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10 * (at your option) any later version.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
15 * GNU General Public License for more details.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
16 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
20 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
21 */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
22
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
23 #ifdef HAVE_CONFIG_H
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
24 #include "../config.h"
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
25 #endif
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
26
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27 #ifdef USE_OSCAR
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29 #include <netdb.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
31 #include <unistd.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 #include <errno.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
33 #include <netinet/in.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
34 #include <arpa/inet.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
35 #include <string.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
36 #include <stdlib.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
37 #include <stdio.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
38 #include <time.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
39 #include <sys/socket.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
40 #include <sys/stat.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
41 #include "gaim.h"
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
42 #include <aim.h>
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
43 #include "gnome_applet_mgr.h"
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
44
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
45 static int inpa = -1;
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
46 static int paspa = -1;
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
47 struct aim_session_t *gaim_sess;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
48 struct aim_conn_t *gaim_conn;
369
cf895313fc50 [gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
49 int gaim_caps = AIM_CAPS_CHAT | AIM_CAPS_SENDFILE | AIM_CAPS_GETFILE |
cf895313fc50 [gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
50 AIM_CAPS_VOICE | AIM_CAPS_IMIMAGE | AIM_CAPS_BUDDYICON;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
51
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
52 GList *oscar_chats = NULL;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
53
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
54 struct chat_connection *find_oscar_chat(char *name) {
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
55 GList *g = oscar_chats;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
56 struct chat_connection *c = NULL;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
57
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
58 while (g) {
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
59 c = (struct chat_connection *)g->data;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
60 if (!strcmp(name, c->name))
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
61 break;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
62 g = g->next;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
63 c = NULL;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
64 }
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
65
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
66 return c;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
67 }
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
68
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
69 static int gaim_parse_auth_resp (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
70 static int gaim_auth_server_ready(struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
71 static int gaim_server_ready (struct aim_session_t *, struct command_rx_struct *, ...);
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
72 static int gaim_chat_server_ready(struct aim_session_t *, struct command_rx_struct *, ...);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
73 static int gaim_handle_redirect (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
74 static int gaim_parse_oncoming (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
75 static int gaim_parse_offgoing (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
76 static int gaim_parse_incoming_im(struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
77 static int gaim_parse_misses (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
78 static int gaim_parse_user_info (struct aim_session_t *, struct command_rx_struct *, ...);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
79 static int gaim_parse_motd (struct aim_session_t *, struct command_rx_struct *, ...);
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
80 static int gaim_chatnav_info (struct aim_session_t *, struct command_rx_struct *, ...);
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
81 static int gaim_chat_join (struct aim_session_t *, struct command_rx_struct *, ...);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
82 static int gaim_chat_leave (struct aim_session_t *, struct command_rx_struct *, ...);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
83 static int gaim_chat_info_update (struct aim_session_t *, struct command_rx_struct *, ...);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
84 static int gaim_chat_incoming_msg(struct aim_session_t *, struct command_rx_struct *, ...);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
85
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
86 extern void auth_failed();
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
87
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
88 static void oscar_callback(gpointer data, gint source,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
89 GdkInputCondition condition) {
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
90 struct aim_conn_t *conn = (struct aim_conn_t *)data;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
91
259
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
92 if (condition & GDK_INPUT_EXCEPTION) {
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
93 signoff();
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
94 hide_login_progress(_("Disconnected."));
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
95 aim_logoff(gaim_sess);
259
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
96 gdk_input_remove(inpa);
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
97 auth_failed();
259
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
98 return;
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
99 }
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
100 if (condition & GDK_INPUT_READ) {
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
101 if (aim_get_command(gaim_sess, conn) < 0) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
102 debug_print(_("connection error!\n"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
103 signoff();
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
104 hide_login_progress(_("Disconnected."));
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
105 aim_logoff(gaim_sess);
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
106 auth_failed();
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
107 gdk_input_remove(inpa);
259
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
108 } else {
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
109 aim_rxdispatch(gaim_sess);
259
e159ba2486fc [gaim-migrate @ 269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 253
diff changeset
110 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
111 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
112 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
113
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
114 int oscar_login(char *username, char *password) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
115 struct aim_session_t *sess;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
116 struct aim_conn_t *conn;
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
117 struct client_info_s info = {"Gaim/Faim", 4, 30, 3141, "us", "en"};
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
118 struct aim_user *u;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
119 char buf[256];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
120
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
121 sprintf(debug_buff, _("Logging in %s\n"), username);
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
122 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
123
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
124 sess = g_new0(struct aim_session_t, 1);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
125 aim_session_init(sess);
279
501e09c51cbc [gaim-migrate @ 289]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 277
diff changeset
126 /* we need an immediate queue because we don't use a while-loop to
501e09c51cbc [gaim-migrate @ 289]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 277
diff changeset
127 * see if things need to be sent. */
501e09c51cbc [gaim-migrate @ 289]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 277
diff changeset
128 sess->tx_enqueue = &aim_tx_enqueue__immediate;
501e09c51cbc [gaim-migrate @ 289]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 277
diff changeset
129 gaim_sess = sess;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
130
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
131 sprintf(buf, _("Looking up %s"), FAIM_LOGIN_SERVER);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
132 set_login_progress(1, buf);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
133 conn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, FAIM_LOGIN_SERVER);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
134
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
135 if (conn == NULL) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
136 debug_print(_("internal connection error\n"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
137 #ifdef USE_APPLET
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
138 setUserState(offline);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
139 #endif
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
140 set_state(STATE_OFFLINE);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
141 hide_login_progress(_("Unable to login to AIM"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
142 return -1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
143 } else if (conn->fd == -1) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
144 #ifdef USE_APPLET
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
145 setUserState(offline);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
146 #endif
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
147 set_state(STATE_OFFLINE);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
148 if (conn->status & AIM_CONN_STATUS_RESOLVERR) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
149 sprintf(debug_buff, _("couldn't resolve host\n"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
150 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
151 hide_login_progress(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
152 } else if (conn->status & AIM_CONN_STATUS_CONNERR) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
153 sprintf(debug_buff, _("couldn't connect to host\n"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
154 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
155 hide_login_progress(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
156 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
157 return -1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
158 }
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
159 g_snprintf(buf, sizeof(buf), _("Signon: %s"), username);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
160 set_login_progress(2, buf);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
161
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
162 aim_conn_addhandler(sess, conn, AIM_CB_FAM_SPECIAL,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
163 AIM_CB_SPECIAL_AUTHSUCCESS,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
164 gaim_parse_auth_resp, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
165 aim_conn_addhandler(sess, conn, AIM_CB_FAM_GEN,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
166 AIM_CB_GEN_SERVERREADY,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
167 gaim_auth_server_ready, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
168 aim_send_login(sess, conn, username, password, &info);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
169
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
170 inpa = gdk_input_add(conn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
171 oscar_callback, conn);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
172
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
173 u = find_user(username);
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
174
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
175 if (!u) {
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
176 u = g_new0(struct aim_user, 1);
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
177 g_snprintf(u->username, sizeof(u->username), DEFAULT_INFO);
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
178 aim_users = g_list_append(aim_users, u);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
179 }
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
180 current_user = u;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
181 g_snprintf(current_user->username, sizeof(current_user->username),
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
182 "%s", username);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
183 g_snprintf(current_user->password, sizeof(current_user->password),
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
184 "%s", password);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
185 save_prefs();
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
186
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
187 debug_print(_("Password sent, waiting for response\n"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
188
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
189 return 0;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
190 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
191
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
192 void oscar_close() {
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
193 #ifdef USE_APPLET
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
194 setUserState(offline);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
195 #endif
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
196 set_state(STATE_OFFLINE);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
197 if (inpa > 0)
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
198 gdk_input_remove(inpa);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
199 inpa = -1;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
200 aim_logoff(gaim_sess);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
201 debug_print(_("Signed off.\n"));
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
202 }
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
203
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
204 int gaim_parse_auth_resp(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
205 struct command_rx_struct *command, ...) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
206 struct aim_conn_t *bosconn = NULL;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
207 sprintf(debug_buff, "inside auth_resp (Screen name: %s)\n",
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
208 sess->logininfo.screen_name);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
209 debug_print(debug_buff);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
210
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
211 if (sess->logininfo.errorcode) {
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
212 switch (sess->logininfo.errorcode) {
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
213 case 0x18:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
214 /* connecting too frequently */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
215 show_error_dialog("983\0\0");
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
216 break;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
217 case 0x05:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
218 /* Incorrect nick/password */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
219 show_error_dialog("980\0\0");
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
220 break;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
221 case 0x1c:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
222 /* client too old */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
223 show_error_dialog("981\0\0");
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
224 break;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
225 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
226 sprintf(debug_buff, "Login Error Code 0x%04x\n",
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
227 sess->logininfo.errorcode);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
228 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
229 sprintf(debug_buff, "Error URL: %s\n",
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
230 sess->logininfo.errorurl);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
231 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
232 #ifdef USE_APPLET
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
233 setUserState(offline);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
234 #endif
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
235 set_state(STATE_OFFLINE);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
236 hide_login_progress(_("Authentication Failed"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
237 gdk_input_remove(inpa);
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
238 aim_conn_kill(sess, &command->conn);
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
239 auth_failed();
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
240 return 0;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
241 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
242
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
243
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
244 sprintf(debug_buff, "Email: %s\n", sess->logininfo.email);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
245 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
246 sprintf(debug_buff, "Closing auth connection...\n");
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
247 debug_print(debug_buff);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
248 gdk_input_remove(inpa);
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
249 aim_conn_kill(sess, &command->conn);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
250
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
251 bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, sess->logininfo.BOSIP);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
252 if (bosconn == NULL) {
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
253 #ifdef USE_APPLET
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
254 setUserState(offline);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
255 #endif
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
256 set_state(STATE_OFFLINE);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
257 hide_login_progress(_("Internal Error"));
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
258 auth_failed();
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
259 return -1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
260 } else if (bosconn->status != 0) {
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
261 #ifdef USE_APPLET
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
262 setUserState(offline);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
263 #endif
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
264 set_state(STATE_OFFLINE);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
265 hide_login_progress(_("Could Not Connect"));
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
266 auth_failed();
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
267 return -1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
268 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
269
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
270 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ACK, AIM_CB_ACK_ACK, NULL, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
271 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_SERVERREADY, gaim_server_ready, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
272 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATEINFO, NULL, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
273 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_REDIRECT, gaim_handle_redirect, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
274 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_STS, AIM_CB_STS_SETREPORTINTERVAL, NULL, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
275 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_BUD, AIM_CB_BUD_ONCOMING, gaim_parse_oncoming, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
276 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_BUD, AIM_CB_BUD_OFFGOING, gaim_parse_offgoing, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
277 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_INCOMING, gaim_parse_incoming_im, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
278 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_ERROR, gaim_parse_misses, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
279 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_MISSEDCALL, gaim_parse_misses, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
280 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_RATECHANGE, gaim_parse_misses, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
281 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_ERROR, gaim_parse_misses, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
282 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO, gaim_parse_user_info, 0);
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
283 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_CTN, AIM_CB_CTN_DEFAULT, aim_parse_unknown, 0);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
284 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_DEFAULT, aim_parse_unknown, 0);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
285 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_GEN, AIM_CB_GEN_MOTD, gaim_parse_motd, 0);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
286
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
287 aim_auth_sendcookie(sess, bosconn, sess->logininfo.cookie);
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
288 gaim_conn = bosconn;
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
289 inpa = gdk_input_add(bosconn->fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
290 oscar_callback, bosconn);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
291 set_login_progress(4, _("Connection established, cookie sent"));
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
292 return 1;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
293 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
294
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
295 gboolean change_password = FALSE;
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
296 char *old_password;
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
297 char *new_password;
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
298
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
299 int gaim_auth_server_ready(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
300 struct command_rx_struct *command, ...) {
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
301 debug_print("Authorization server is ready.\n");
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
302 aim_auth_clientready(sess, command->conn);
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
303 if (change_password) {
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
304 debug_print("Changing passwords...\n");
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
305 aim_auth_changepasswd(sess, command->conn, old_password,
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
306 new_password);
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
307 g_free(old_password);
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
308 g_free(new_password);
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
309 change_password = FALSE;
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
310 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
311 return 1;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
312 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
313
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
314 int gaim_server_ready(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
315 struct command_rx_struct *command, ...) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
316 switch (command->conn->type) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
317 case AIM_CONN_TYPE_BOS:
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
318 aim_bos_reqrate(sess, command->conn);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
319 aim_bos_ackrateresp(sess, command->conn);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
320 aim_bos_setprivacyflags(sess, command->conn, 0x00000003);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
321 aim_bos_reqservice(sess, command->conn, AIM_CONN_TYPE_ADS);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
322 aim_bos_setgroupperm(sess, command->conn, 0x1f);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
323 debug_print("done with BOS ServerReady\n");
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
324 break;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
325 case AIM_CONN_TYPE_CHATNAV:
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
326 debug_print("chatnav: got server ready\n");
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
327 aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_CTN, AIM_CB_CTN_INFO, gaim_chatnav_info, 0);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
328 aim_bos_reqrate(sess, command->conn);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
329 aim_bos_ackrateresp(sess, command->conn);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
330 aim_chatnav_clientready(sess, command->conn);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
331 aim_chatnav_reqrights(sess, command->conn);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
332 break;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
333 default: /* huh? */
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
334 sprintf(debug_buff, "server ready: got unexpected connection type %04x\n", command->conn->type);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
335 debug_print(debug_buff);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
336 break;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
337 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
338 return 1;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
339 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
340
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
341 int gaim_chat_server_ready(struct aim_session_t *sess,
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
342 struct command_rx_struct *command, ...) {
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
343 static int id = 1;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
344 debug_print("chat: got server ready\n");
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
345 aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERJOIN, gaim_chat_join, 0);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
346 aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_USERLEAVE, gaim_chat_leave, 0);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
347 aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, gaim_chat_info_update, 0);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
348 aim_conn_addhandler(sess, command->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, gaim_chat_incoming_msg, 0);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
349 aim_bos_reqrate(sess, command->conn);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
350 aim_bos_ackrateresp(sess, command->conn);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
351 aim_chat_clientready(sess, command->conn);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
352 serv_got_joined_chat(id++, aim_chat_getname(command->conn));
411
a330017b3aa4 [gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
353 return 1;
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
354 }
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
355
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
356 extern void gaim_setup();
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
357 extern int bud_list_cache_exists();
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
358 extern void do_import(GtkWidget *w, void *dummy);
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
359
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
360 int gaim_handle_redirect(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
361 struct command_rx_struct *command, ...) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
362 va_list ap;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
363 int serviceid;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
364 char *ip;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
365 char *cookie;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
366
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
367 va_start(ap, command);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
368 serviceid = va_arg(ap, int);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
369 ip = va_arg(ap, char *);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
370 cookie = va_arg(ap, char *);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
371
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
372 switch(serviceid) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
373 case 0x0005: /* Ads */
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
374 debug_print("Received Ads, finishing login\n");
319
cea40691706c [gaim-migrate @ 329]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 312
diff changeset
375 /* we'll take care of this in the parse_toc_buddy_config() below
277
bba300ed4fab [gaim-migrate @ 287]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 276
diff changeset
376 sprintf(buddies, "%s&", current_user->username);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
377 aim_bos_setbuddylist(sess, command->conn, buddies);
319
cea40691706c [gaim-migrate @ 329]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 312
diff changeset
378 */
277
bba300ed4fab [gaim-migrate @ 287]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 276
diff changeset
379 aim_bos_setprofile(sess, command->conn, current_user->user_info,
bba300ed4fab [gaim-migrate @ 287]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 276
diff changeset
380 NULL, gaim_caps);
276
9e6fc62490cd [gaim-migrate @ 286]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 274
diff changeset
381 aim_seticbmparam(sess, command->conn);
288
6e609d42f767 [gaim-migrate @ 298]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 283
diff changeset
382 aim_conn_setlatency(command->conn, 1);
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
383
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
384 #ifdef USE_APPLET
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
385 make_buddy();
74
e16ad7d73cd6 [gaim-migrate @ 84]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 10
diff changeset
386 if (general_options & OPT_GEN_APP_BUDDY_SHOW) {
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
387 gnome_buddy_show();
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
388 createOnlinePopup();
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
389 set_applet_draw_open();
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
390 } else {
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
391 gnome_buddy_hide();
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
392 set_applet_draw_closed();
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
393 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
394 setUserState(online);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
395 gtk_widget_hide(mainwindow);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
396 #else
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
397 gtk_widget_hide(mainwindow);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
398 show_buddy_list();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
399 refresh_buddy_window();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
400 #endif
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
401 serv_finish_login();
265
59f1748b09a6 [gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 259
diff changeset
402 gaim_setup();
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
403 if (bud_list_cache_exists())
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
404 do_import(NULL, 0);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
405
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
406 aim_bos_clientready(sess, command->conn);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
407 debug_print("Roger that, all systems go\n");
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
408 aim_bos_reqservice(sess, command->conn, AIM_CONN_TYPE_CHATNAV);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
409
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
410 break;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
411 case 0x7: /* Authorizer */
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
412 debug_print("Reconnecting with authorizor...\n");
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
413 {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
414 struct aim_conn_t *tstconn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, ip);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
415 if (tstconn == NULL || tstconn->status >= AIM_CONN_STATUS_RESOLVERR)
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
416 debug_print("unable to reconnect with authorizer\n");
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
417 else {
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
418 paspa = gdk_input_add(tstconn->fd,
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
419 GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
420 oscar_callback, tstconn);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
421 aim_auth_sendcookie(sess, tstconn, cookie);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
422 }
331
f3c8d79688db [gaim-migrate @ 341]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 319
diff changeset
423 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
424 break;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
425 case 0xd: /* ChatNav */
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
426 {
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
427 struct aim_conn_t *tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHATNAV, ip);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
428 if (tstconn == NULL || tstconn->status >= AIM_CONN_STATUS_RESOLVERR) {
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
429 debug_print("unable to connect to chatnav server\n");
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
430 return 1;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
431 }
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
432 aim_conn_addhandler(sess, tstconn, 0x0001, 0x0003, gaim_server_ready, 0);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
433 aim_auth_sendcookie(sess, tstconn, cookie);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
434 }
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
435 debug_print("chatnav: connected\n");
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
436 break;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
437 case 0xe: /* Chat */
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
438 {
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
439 struct aim_conn_t *tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHAT, ip);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
440 char *roomname = va_arg(ap, char *);
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
441 struct chat_connection *ccon;
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
442 if (tstconn == NULL || tstconn->status >= AIM_CONN_STATUS_RESOLVERR) {
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
443 debug_print("unable to connect to chat server\n");
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
444 return 1;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
445 }
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
446 sprintf(debug_buff, "Connected to chat room %s\n", roomname);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
447 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
448
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
449 ccon = g_new0(struct chat_connection, 1);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
450 ccon->conn = tstconn;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
451 ccon->fd = tstconn->fd;
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
452 ccon->name = g_strdup(roomname);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
453
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
454 ccon->inpa = gdk_input_add(tstconn->fd,
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
455 GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
456 oscar_callback, tstconn);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
457
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
458 oscar_chats = g_list_append(oscar_chats, ccon);
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
459
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
460 aim_chat_attachname(tstconn, roomname);
312
3069be4c291e [gaim-migrate @ 322]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 302
diff changeset
461 aim_conn_addhandler(sess, tstconn, 0x0001, 0x0003, gaim_chat_server_ready, 0);
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
462 aim_auth_sendcookie(sess, tstconn, cookie);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
463 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
464 break;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
465 default: /* huh? */
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
466 sprintf(debug_buff, "got redirect for unknown service 0x%04x\n",
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
467 serviceid);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
468 debug_print(debug_buff);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
469 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
470 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
471
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
472 va_end(ap);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
473
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
474 return 1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
475 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
476
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
477 int gaim_parse_oncoming(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
478 struct command_rx_struct *command, ...) {
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
479 struct aim_userinfo_s *info;
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
480 time_t time_idle;
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
481 int type = 0;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
482
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
483 va_list ap;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
484 va_start(ap, command);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
485 info = va_arg(ap, struct aim_userinfo_s *);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
486 va_end(ap);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
487
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
488 if (info->class & AIM_CLASS_TRIAL)
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
489 type |= UC_UNCONFIRMED;
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
490 else if (info->class & AIM_CLASS_AOL)
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
491 type |= UC_AOL;
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 252
diff changeset
492 else if (info->class & AIM_CLASS_FREE)
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
493 type |= UC_NORMAL;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
494 if (info->class & AIM_CLASS_AWAY)
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
495 type |= UC_UNAVAILABLE;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
496
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
497 if (info->idletime) {
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
498 time(&time_idle);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
499 time_idle -= info->idletime*60;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
500 } else
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
501 time_idle = 0;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
502
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
503 serv_got_update(info->sn, 1, info->warnlevel, info->onlinesince,
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
504 time_idle, type);
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
505
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
506 return 1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
507 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
508
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
509 int gaim_parse_offgoing(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
510 struct command_rx_struct *command, ...) {
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
511 char *sn;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
512 va_list ap;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
513
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
514 va_start(ap, command);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
515 sn = va_arg(ap, char *);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
516 va_end(ap);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
517
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
518 serv_got_update(sn, 0, 0, 0, 0, 0);
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
519
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
520 return 1;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
521 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
522
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
523 int gaim_parse_incoming_im(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
524 struct command_rx_struct *command, ...) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
525 int channel;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
526 va_list ap;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
527
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
528 va_start(ap, command);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
529 channel = va_arg(ap, int);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
530
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
531 /* channel 1: standard message */
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
532 if (channel == 1) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
533 struct aim_userinfo_s *userinfo;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
534 char *msg = NULL;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
535 u_int icbmflags = 0;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
536 u_short flag1, flag2;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
537
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
538 userinfo = va_arg(ap, struct aim_userinfo_s *);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
539 msg = va_arg(ap, char *);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
540 icbmflags = va_arg(ap, u_int);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
541 flag1 = va_arg(ap, u_short);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
542 flag2 = va_arg(ap, u_short);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
543 va_end(ap);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
544
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
545 serv_got_im(userinfo->sn, msg, icbmflags & AIM_IMFLAGS_AWAY);
252
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
546 } else if (channel == 2) {
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
547 struct aim_userinfo_s *userinfo;
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
548 int rendtype = va_arg(ap, int);
387
86e27f0c6ce5 [gaim-migrate @ 397]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 369
diff changeset
549 if (rendtype == 0 ||
388
7fb34b73946a [gaim-migrate @ 398]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 387
diff changeset
550 rendtype == AIM_RENDEZVOUS_CHAT_EX3 ||
7fb34b73946a [gaim-migrate @ 398]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 387
diff changeset
551 rendtype == AIM_RENDEZVOUS_CHAT_EX4 ||
7fb34b73946a [gaim-migrate @ 398]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 387
diff changeset
552 rendtype == AIM_RENDEZVOUS_CHAT_EX5) {
252
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
553 char *msg, *encoding, *lang;
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
554 struct aim_chat_roominfo *roominfo;
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
555
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
556 userinfo = va_arg(ap, struct aim_userinfo_s *);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
557 roominfo = va_arg(ap, struct aim_chat_roominfo *);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
558 msg = va_arg(ap, char *);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
559 encoding = va_arg(ap, char *);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
560 lang = va_arg(ap, char *);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
561 va_end(ap);
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
562
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
563 serv_got_chat_invite(roominfo->name,
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
564 roominfo->instance,
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
565 userinfo->sn,
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
566 msg);
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
567 } else if (rendtype == AIM_RENDEZVOUS_FILETRANSFER) {
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
568 /* libfaim won't tell us that we got this just yet */
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
569 } else if (rendtype == AIM_RENDEZVOUS_FILETRANSFER_GET) {
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
570 /* nor will it tell us this. but it's still there */
369
cf895313fc50 [gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
571 } else if (rendtype == AIM_RENDEZVOUS_VOICE) {
cf895313fc50 [gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
572 /* this one libfaim tells us unuseful info about */
283
0f14e6d8a51b [gaim-migrate @ 293]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 282
diff changeset
573 } else {
0f14e6d8a51b [gaim-migrate @ 293]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 282
diff changeset
574 sprintf(debug_buff, "Unknown rendtype %d\n", rendtype);
0f14e6d8a51b [gaim-migrate @ 293]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 282
diff changeset
575 debug_print(debug_buff);
252
4a41f8323022 [gaim-migrate @ 262]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 250
diff changeset
576 }
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
577 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
578
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
579 return 1;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
580 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
581
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
582 int gaim_parse_misses(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
583 struct command_rx_struct *command, ...) {
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
584 u_short family;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
585 u_short subtype;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
586
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
587 family = aimutil_get16(command->data+0);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
588 subtype = aimutil_get16(command->data+2);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
589
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
590 switch (family) {
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
591 case 0x0001:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
592 if (subtype == 0x000a) {
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
593 /* sending messages too fast */
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
594 /* this also gets sent to us when our warning level
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
595 * changes, don't ask me why or how to interpret it */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
596 show_error_dialog("960\0someone");
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
597 }
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
598 break;
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
599 case 0x0002:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
600 if (subtype == 0x0001) {
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
601 /* unknown SNAC error */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
602 show_error_dialog("970\0\0");
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
603 }
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
604 break;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
605 case 0x0004:
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
606 if (subtype == 0x0001) {
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
607 /* user is not logged in */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
608 show_error_dialog("901\0User");
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
609 } else if (subtype == 0x000a) {
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
610 /* message has been dropped */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
611 show_error_dialog("903\0\0");
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
612 }
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
613 break;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
614 }
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
615
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
616 return 1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
617 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
618
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
619 int gaim_parse_user_info(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
620 struct command_rx_struct *command, ...) {
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
621 struct aim_userinfo_s *info;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
622 char *prof_enc = NULL, *prof = NULL;
249
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
623 u_short infotype;
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
624 char buf[BUF_LONG];
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
625 va_list ap;
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
626
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
627 va_start(ap, command);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
628 info = va_arg(ap, struct aim_userinfo_s *);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
629 prof_enc = va_arg(ap, char *);
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
630 prof = va_arg(ap, char *);
249
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
631 infotype = va_arg(ap, u_short);
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
632 va_end(ap);
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
633
249
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
634 if (prof == NULL || !strlen(prof)) {
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 388
diff changeset
635 /* no info/away message */
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
636 show_error_dialog("977\0\0");
249
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
637 return 1;
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
638 }
810c595258c8 [gaim-migrate @ 259]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 248
diff changeset
639
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
640 snprintf(buf, sizeof buf, _("Username : <B>%s</B>\n<BR>"
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
641 "Warning Level : <B>%d %%</B>\n<BR>"
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
642 "Online Since : <B>%s</B><BR>"
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
643 "Idle Minutes : <B>%d</B>\n<BR><HR><BR>"
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
644 "%s\n"),
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
645 info->sn,
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
646 info->warnlevel,
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
647 asctime(localtime(&info->onlinesince)),
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
648 info->idletime,
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
649 prof);
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
650 g_show_info_text(buf);
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 243
diff changeset
651
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
652 return 1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
653 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
654
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
655 int gaim_parse_motd(struct aim_session_t *sess,
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
656 struct command_rx_struct *command, ...) {
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
657 char *msg;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
658 u_short id;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
659 va_list ap;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
660
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
661 va_start(ap, command);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
662 id = va_arg(ap, u_short);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
663 msg = va_arg(ap, char *);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
664 va_end(ap);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
665
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
666 sprintf(debug_buff, "MOTD: %s\n", msg);
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
667 debug_print(debug_buff);
282
918db59d3814 [gaim-migrate @ 292]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 279
diff changeset
668 sprintf(debug_buff, "Gaim %s / Libfaim %s\n",
918db59d3814 [gaim-migrate @ 292]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 279
diff changeset
669 VERSION, aim_getbuildstring());
918db59d3814 [gaim-migrate @ 292]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 279
diff changeset
670 debug_print(debug_buff);
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
671
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
672 return 1;
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
673 }
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
674
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
675 int gaim_chatnav_info(struct aim_session_t *sess,
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
676 struct command_rx_struct *command, ...) {
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
677 va_list ap = va_start(ap, command);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
678 u_short type = va_arg(ap, u_short);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
679
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
680 switch(type) {
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
681 case 0x0002: {
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
682 int maxrooms;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
683 struct aim_chat_exchangeinfo *exchanges;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
684 int exchangecount, i = 0;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
685
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
686 maxrooms = va_arg(ap, u_char);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
687 exchangecount = va_arg(ap, int);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
688 exchanges = va_arg(ap, struct aim_chat_exchangeinfo *);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
689 va_end(ap);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
690
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
691 debug_print("chat info: Chat Rights:\n");
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
692 sprintf(debug_buff, "chat info: \tMax Concurrent Rooms: %d\n", maxrooms);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
693 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
694 sprintf(debug_buff, "chat info: \tExchange List: (%d total)\n", exchangecount);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
695 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
696 while (i < exchangecount) {
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
697 sprintf(debug_buff, "chat info: \t\t%x: %s (%s/%s)\n",
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
698 exchanges[i].number,
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
699 exchanges[i].name,
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
700 exchanges[i].charset1,
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
701 exchanges[i].lang1);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
702 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
703 i++;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
704 }
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
705 }
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 335
diff changeset
706 aim_conn_kill(sess, &command->conn);
302
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
707 break;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
708 default:
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
709 va_end(ap);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
710 sprintf(debug_buff, "chatnav info: unknown type (%04x)\n", type);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
711 debug_print(debug_buff);
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
712 break;
61894ab8c47e [gaim-migrate @ 312]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 288
diff changeset
713 }
242
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
714 return 1;
14fc16f579c8 [gaim-migrate @ 252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 237
diff changeset
715 }
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
716
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
717 int gaim_chat_join(struct aim_session_t *sess,
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
718 struct command_rx_struct *command, ...) {
248
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
719 va_list ap;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
720 int count, i = 0;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
721 struct aim_userinfo_s *info;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
722
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
723 GList *bcs = buddy_chats;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
724 struct buddy_chat *b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
725
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
726 va_start(ap, command);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
727 count = va_arg(ap, int);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
728 info = va_arg(ap, struct aim_userinfo_s *);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
729 va_end(ap);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
730
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
731 while(bcs) {
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
732 b = (struct buddy_chat *)bcs->data;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
733 if (!strcasecmp(b->name, (char *)command->conn->priv))
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
734 break;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
735 bcs = bcs->next;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
736 b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
737 }
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
738 if (!b)
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
739 return 1;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
740
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
741 while (i < count)
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
742 add_chat_buddy(b, info[i++].sn);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
743
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
744 return 1;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
745 }
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
746
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
747 int gaim_chat_leave(struct aim_session_t *sess,
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
748 struct command_rx_struct *command, ...) {
248
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
749 va_list ap;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
750 int count, i = 0;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
751 struct aim_userinfo_s *info;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
752
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
753 GList *bcs = buddy_chats;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
754 struct buddy_chat *b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
755
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
756 va_start(ap, command);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
757 count = va_arg(ap, int);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
758 info = va_arg(ap, struct aim_userinfo_s *);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
759 va_end(ap);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
760
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
761 while(bcs) {
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
762 b = (struct buddy_chat *)bcs->data;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
763 if (!strcasecmp(b->name, (char *)command->conn->priv))
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
764 break;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
765 bcs = bcs->next;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
766 b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
767 }
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
768 if (!b)
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
769 return 1;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
770
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
771 while (i < count)
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
772 remove_chat_buddy(b, info[i++].sn);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
773
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
774 return 1;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
775 }
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
776
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
777 int gaim_chat_info_update(struct aim_session_t *sess,
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
778 struct command_rx_struct *command, ...) {
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
779 /* FIXME */
248
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
780 debug_print("inside chat_info_update\n");
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
781 return 1;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
782 }
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
783
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
784 int gaim_chat_incoming_msg(struct aim_session_t *sess,
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
785 struct command_rx_struct *command, ...) {
248
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
786 va_list ap;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
787 struct aim_userinfo_s *info;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
788 char *msg;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
789
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
790 GList *bcs = buddy_chats;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
791 struct buddy_chat *b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
792
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
793 va_start(ap, command);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
794 info = va_arg(ap, struct aim_userinfo_s *);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
795 msg = va_arg(ap, char *);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
796
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
797 while(bcs) {
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
798 b = (struct buddy_chat *)bcs->data;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
799 if (!strcasecmp(b->name, (char *)command->conn->priv))
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
800 break;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
801 bcs = bcs->next;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
802 b = NULL;
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
803 }
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
804 if (!b)
270
cfa39d39dec6 [gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 267
diff changeset
805 return 0;
248
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
806
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
807 serv_got_chat_in(b->id, info->sn, 0, msg);
cfc73b8501a7 [gaim-migrate @ 258]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
808
243
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
809 return 1;
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
810 }
3414ff74cb0f [gaim-migrate @ 253]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 242
diff changeset
811
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
812 #endif /* USE_OSCAR */