Mercurial > pidgin.yaz
annotate src/toc.c @ 983:a05ad732b613
[gaim-migrate @ 993]
bleh
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 13 Oct 2000 07:52:34 +0000 |
parents | 7e231bc0018a |
children | 9523b772e546 |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
22 | |
23 | |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
333
diff
changeset
|
24 #ifdef HAVE_CONFIG_H |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
333
diff
changeset
|
25 #include "../config.h" |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
333
diff
changeset
|
26 #endif |
1 | 27 #include <netdb.h> |
28 #include <gtk/gtk.h> | |
29 #include <unistd.h> | |
30 #include <errno.h> | |
31 #include <netinet/in.h> | |
32 #include <arpa/inet.h> | |
33 #include <string.h> | |
34 #include <stdlib.h> | |
35 #include <stdio.h> | |
36 #include <time.h> | |
37 #include <sys/socket.h> | |
981
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
38 #include "prpl.h" |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
39 #include "multi.h" |
1 | 40 #include "gaim.h" |
41 #include "gnome_applet_mgr.h" | |
42 | |
981
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
43 #define REVISION "gaim:$Revision: 991 $" |
1 | 44 |
45 | |
46 static unsigned int peer_ver=0; | |
47 #ifdef _WIN32 | |
48 static int win32_r; | |
49 #endif | |
50 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
51 static int toc_signon(struct gaim_connection *); |
1 | 52 |
53 | |
54 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
55 /* ok. this function used to take username/password, and return 0 on success. |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
56 * now, it takes username/password, and returns NULL on error or a new gaim_connection |
976
2586b2a3725e
[gaim-migrate @ 986]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
975
diff
changeset
|
57 * on success. */ |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
58 void toc_login(struct aim_user *user) |
1 | 59 { |
60 char *config; | |
61 struct in_addr *sin; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
62 struct gaim_connection *gc; |
1 | 63 char buf[80]; |
64 char buf2[2048]; | |
65 | |
66 g_snprintf(buf, sizeof(buf), "Looking up %s", aim_host); | |
67 | |
68 sin = (struct in_addr *)get_address(aim_host); | |
69 if (!sin) { | |
70 g_snprintf(buf, sizeof(buf), "Unable to lookup %s", aim_host); | |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
71 hide_login_progress(user->username, buf); |
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
72 return; |
1 | 73 } |
74 | |
75 g_snprintf(toc_addy, sizeof(toc_addy), "%s", inet_ntoa(*sin)); | |
76 g_snprintf(buf, sizeof(buf), "Connecting to %s", inet_ntoa(*sin)); | |
77 | |
78 | |
79 | |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
80 gc = new_gaim_conn(PROTO_TOC, user->username, user->password); |
1 | 81 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
82 gc->toc_fd = connect_address(sin->s_addr, aim_port); |
1 | 83 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
84 if (gc->toc_fd < 0) { |
1 | 85 g_snprintf(buf, sizeof(buf), "Connect to %s failed", |
86 inet_ntoa(*sin)); | |
975
a45991891aba
[gaim-migrate @ 985]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
971
diff
changeset
|
87 hide_login_progress(gc->username, buf); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
88 destroy_gaim_conn(gc); |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
89 return; |
1 | 90 } |
91 | |
92 g_free(sin); | |
93 | |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
94 g_snprintf(buf, sizeof(buf), "Signon: %s", gc->username); |
1 | 95 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
96 if (toc_signon(gc) < 0) { |
975
a45991891aba
[gaim-migrate @ 985]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
971
diff
changeset
|
97 hide_login_progress(gc->username, "Disconnected."); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
98 destroy_gaim_conn(gc); |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
99 return; |
1 | 100 } |
101 | |
102 g_snprintf(buf, sizeof(buf), "Waiting for reply..."); | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
103 if (toc_wait_signon(gc) < 0) { |
975
a45991891aba
[gaim-migrate @ 985]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
971
diff
changeset
|
104 hide_login_progress(gc->username, "Authentication Failed"); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
105 destroy_gaim_conn(gc); |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
106 return; |
1 | 107 } |
108 | |
980
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
109 sprintf(gc->user_info, "%s", user->user_info); |
82c5865f7cfe
[gaim-migrate @ 990]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
978
diff
changeset
|
110 gc->options = user->options; |
1 | 111 save_prefs(); |
112 | |
113 g_snprintf(buf, sizeof(buf), "Retrieving config..."); | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
114 config = toc_wait_config(gc); |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
115 gc->state = STATE_ONLINE; |
1 | 116 |
966
f7886476f9d9
[gaim-migrate @ 976]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
964
diff
changeset
|
117 if (mainwindow) |
f7886476f9d9
[gaim-migrate @ 976]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
964
diff
changeset
|
118 gtk_widget_hide(mainwindow); |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
119 show_buddy_list(); |
1 | 120 #ifdef USE_APPLET |
10 | 121 if (general_options & OPT_GEN_APP_BUDDY_SHOW) { |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
122 refresh_buddy_window(); |
50 | 123 createOnlinePopup(); |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
124 applet_buddy_show = TRUE; |
1 | 125 } else { |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
126 gtk_widget_hide(blist); |
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
127 applet_buddy_show = FALSE; |
1 | 128 } |
129 | |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
130 set_user_state(online); |
1 | 131 #else |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
132 refresh_buddy_window(); |
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
710
diff
changeset
|
133 #endif |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
134 if (config != NULL) |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
135 parse_toc_buddy_list(gc, config, 0); |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
136 else |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
137 do_import(0, gc); |
1 | 138 |
774
b61607d6c2af
[gaim-migrate @ 784]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
762
diff
changeset
|
139 setup_buddy_chats(); |
b61607d6c2af
[gaim-migrate @ 784]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
762
diff
changeset
|
140 |
1 | 141 g_snprintf(buf2, sizeof(buf2), "toc_init_done"); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
142 sflap_send(gc, buf2, -1, TYPE_DATA); |
1 | 143 |
211
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
144 g_snprintf(buf2, sizeof(buf2), "toc_set_caps %s %s %s %s %s", |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
145 FILE_SEND_UID, FILE_GET_UID, B_ICON_UID, IMAGE_UID, |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
146 VOICE_UID); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
147 sflap_send(gc, buf2, -1, TYPE_DATA); |
149 | 148 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
149 if (gc->keepalive < 0) |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
150 update_keepalive(gc, gc->options & OPT_USR_KEEPALV); |
930
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
866
diff
changeset
|
151 |
970 | 152 serv_finish_login(gc); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
153 gaim_setup(gc); |
1 | 154 } |
155 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
156 void toc_close(struct gaim_connection *gc) |
1 | 157 { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
158 if (gc->protocol != PROTO_TOC) return; /* how did this happen? */ |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
159 if (gc->inpa > 0) |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
160 gdk_input_remove(gc->inpa); |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
161 gc->inpa = -1; |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
162 close(gc->toc_fd); |
1 | 163 } |
164 | |
165 unsigned char *roast_password(char *pass) | |
166 { | |
167 /* Trivial "encryption" */ | |
168 static char rp[256]; | |
169 static char *roast = ROAST; | |
170 int pos=2; | |
171 int x; | |
172 strcpy(rp, "0x"); | |
173 for (x=0;(x<150) && pass[x]; x++) | |
174 pos+=sprintf(&rp[pos],"%02x", pass[x] ^ roast[x % strlen(roast)]); | |
175 rp[pos]='\0'; | |
176 return rp; | |
177 } | |
178 | |
179 | |
180 char *print_header(void *hdr_v) | |
181 { | |
182 static char s[80]; | |
183 struct sflap_hdr *hdr = (struct sflap_hdr *)hdr_v; | |
184 g_snprintf(s,sizeof(s), "[ ast: %c, type: %d, seqno: %d, len: %d ]", | |
185 hdr->ast, hdr->type, ntohs(hdr->seqno), ntohs(hdr->len)); | |
186 return s; | |
187 } | |
188 | |
189 void print_buffer(char *buf, int len) | |
190 { | |
191 #if 0 | |
192 int x; | |
193 printf("[ "); | |
194 for (x=0;x<len;x++) | |
195 printf("%d ", buf[x]); | |
196 printf("]\n"); | |
197 printf("[ "); | |
198 for (x=0;x<len;x++) | |
199 printf("%c ", buf[x]); | |
200 printf("]\n"); | |
201 #endif | |
202 } | |
203 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
204 int sflap_send(struct gaim_connection *gc, char *buf, int olen, int type) |
1 | 205 { |
206 int len; | |
207 int slen=0; | |
208 struct sflap_hdr hdr; | |
209 char obuf[MSG_LEN]; | |
210 | |
970 | 211 /* One _last_ 2048 check here! This shouldn't ever |
212 * get hit though, hopefully. If it gets hit on an IM | |
213 * It'll lose the last " and the message won't go through, | |
214 * but this'll stop a segfault. */ | |
215 if (strlen(buf) > (MSG_LEN - sizeof(hdr))) { | |
216 buf[MSG_LEN - sizeof(hdr) - 3] = '"'; | |
217 buf[MSG_LEN - sizeof(hdr) - 2] = '\0'; | |
218 } | |
1 | 219 |
970 | 220 debug_printf("%s [Len %d]\n", buf, strlen(buf)); |
1 | 221 |
222 if (olen < 0) | |
223 len = escape_message(buf); | |
224 else | |
225 len = olen; | |
226 hdr.ast = '*'; | |
227 hdr.type = type; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
228 hdr.seqno = htons(gc->seqno++ & 0xffff); |
1 | 229 hdr.len = htons(len + (type == TYPE_SIGNON ? 0 : 1)); |
230 | |
231 sprintf(debug_buff,"Escaped message is '%s'\n",buf); | |
232 debug_print(debug_buff); | |
233 | |
234 memcpy(obuf, &hdr, sizeof(hdr)); | |
235 slen += sizeof(hdr); | |
236 memcpy(&obuf[slen], buf, len); | |
237 slen += len; | |
238 if (type != TYPE_SIGNON) { | |
239 obuf[slen]='\0'; | |
240 slen += 1; | |
241 } | |
242 print_buffer(obuf, slen); | |
243 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
244 return write(gc->toc_fd, obuf, slen); |
1 | 245 } |
246 | |
247 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
248 static int wait_reply(struct gaim_connection *gc, char *buffer, size_t buflen) |
1 | 249 { |
79 | 250 size_t res=-1; |
251 int read_rv = -1; | |
1 | 252 struct sflap_hdr *hdr=(struct sflap_hdr *)buffer; |
253 char *c; | |
254 | |
79 | 255 if(buflen < sizeof(struct sflap_hdr)) { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
256 do_error_dialog(_("Unable to read from server: Buffer too small"), |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
257 _("Gaim - Error (internal)")); |
79 | 258 return -1; |
259 } | |
260 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
261 while((read_rv = read(gc->toc_fd, buffer, 1))) { |
79 | 262 if (read_rv < 0 || read_rv > 1) |
263 return -1; | |
1 | 264 if (buffer[0] == '*') |
265 break; | |
266 | |
267 } | |
268 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
269 read_rv = read(gc->toc_fd, buffer+1, sizeof(struct sflap_hdr) - 1); |
1 | 270 |
79 | 271 if (read_rv < 0) |
272 return read_rv; | |
1 | 273 |
79 | 274 res = read_rv + 1; |
1 | 275 |
276 | |
277 sprintf(debug_buff, "Rcv: %s %s\n",print_header(buffer), ""); | |
278 debug_print(debug_buff); | |
279 | |
280 | |
79 | 281 if(buflen < sizeof(struct sflap_hdr) + ntohs(hdr->len) + 1) { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
282 do_error_dialog(_("Unable to read from server: Too much information"), |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
283 _("Gaim - Error (internal)")); |
79 | 284 return -1; |
285 } | |
1 | 286 |
287 while (res < (sizeof(struct sflap_hdr) + ntohs(hdr->len))) { | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
288 read_rv = read(gc->toc_fd, buffer + res, (ntohs(hdr->len) + sizeof(struct sflap_hdr)) - res); |
79 | 289 if(read_rv < 0) return read_rv; |
290 res += read_rv; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
291 /* my feeling is this will kill us. if there's data pending then we'll come right back |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
292 * to where we are now. possible workarounds are to remove the input watcher until |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
293 * we're done with this part |
1 | 294 while(gtk_events_pending()) |
295 gtk_main_iteration(); | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
296 */ |
1 | 297 } |
298 | |
299 if (res >= sizeof(struct sflap_hdr)) | |
300 buffer[res]='\0'; | |
301 else | |
302 return res - sizeof(struct sflap_hdr); | |
303 | |
304 switch(hdr->type) { | |
305 case TYPE_SIGNON: | |
306 memcpy(&peer_ver, buffer + sizeof(struct sflap_hdr), 4); | |
307 peer_ver = ntohl(peer_ver); | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
308 gc->seqno = ntohs(hdr->seqno); |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
309 gc->state = STATE_SIGNON_REQUEST; |
1 | 310 break; |
311 case TYPE_DATA: | |
312 if (!strncasecmp(buffer + sizeof(struct sflap_hdr), "SIGN_ON:", strlen("SIGN_ON:"))) | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
313 gc->state = STATE_SIGNON_ACK; |
1 | 314 else if (!strncasecmp(buffer + sizeof(struct sflap_hdr), "CONFIG:", strlen("CONFIG:"))) { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
315 gc->state = STATE_CONFIG; |
301
f905caee43ca
[gaim-migrate @ 311]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
300
diff
changeset
|
316 } else if (!strncasecmp(buffer + sizeof(struct sflap_hdr), "ERROR:", strlen("ERROR:"))) { |
1 | 317 c = strtok(buffer + sizeof(struct sflap_hdr) + strlen("ERROR:"), ":"); |
318 show_error_dialog(c); | |
319 } | |
320 | |
321 sprintf(debug_buff, "Data: %s\n",buffer + sizeof(struct sflap_hdr)); | |
322 debug_print(debug_buff); | |
323 | |
324 break; | |
325 default: | |
326 sprintf(debug_buff, "Unknown/unimplemented packet type %d\n",hdr->type); | |
327 debug_print(debug_buff); | |
328 } | |
329 return res; | |
330 } | |
331 | |
332 | |
333 | |
334 void toc_callback( gpointer data, | |
335 gint source, | |
336 GdkInputCondition condition ) | |
337 { | |
338 char *buf; | |
339 char *c; | |
340 char *l; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
341 struct gaim_connection *gc = (struct gaim_connection *)data; |
1 | 342 |
866
646acb9e9c38
[gaim-migrate @ 876]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
863
diff
changeset
|
343 buf = g_malloc(2 * BUF_LONG); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
344 if (wait_reply(gc, buf, 2 * BUF_LONG) < 0) { |
975
a45991891aba
[gaim-migrate @ 985]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
971
diff
changeset
|
345 hide_login_progress(gc->username, "Connection Closed"); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
346 signoff(gc); /* this will free gc for us */ |
1 | 347 g_free(buf); |
348 return; | |
349 } | |
350 | |
351 | |
352 c=strtok(buf+sizeof(struct sflap_hdr),":"); /* Ditch the first part */ | |
353 if (!strcasecmp(c,"UPDATE_BUDDY")) { | |
354 char *uc; | |
355 int logged, evil, idle, type = 0; | |
356 time_t signon; | |
357 time_t time_idle; | |
358 | |
359 c = strtok(NULL,":"); /* c is name */ | |
360 | |
361 l = strtok(NULL,":"); /* l is T/F logged status */ | |
362 | |
363 sscanf(strtok(NULL, ":"), "%d", &evil); | |
364 | |
365 sscanf(strtok(NULL, ":"), "%ld", &signon); | |
366 | |
367 sscanf(strtok(NULL, ":"), "%d", &idle); | |
368 | |
369 uc = strtok(NULL, ":"); | |
370 | |
371 | |
372 if (!strncasecmp(l,"T",1)) | |
373 logged = 1; | |
374 else | |
375 logged = 0; | |
376 | |
377 | |
378 if (uc[0] == 'A') | |
379 type |= UC_AOL; | |
380 | |
381 switch(uc[1]) { | |
382 case 'A': | |
383 type |= UC_ADMIN; | |
384 break; | |
385 case 'U': | |
386 type |= UC_UNCONFIRMED; | |
387 break; | |
388 case 'O': | |
389 type |= UC_NORMAL; | |
390 break; | |
391 default: | |
392 break; | |
393 } | |
394 | |
395 switch(uc[2]) { | |
396 case 'U': | |
397 type |= UC_UNAVAILABLE; | |
398 break; | |
399 default: | |
400 break; | |
401 } | |
402 | |
403 if (idle) { | |
404 time(&time_idle); | |
405 time_idle -= idle*60; | |
406 } else | |
407 time_idle = 0; | |
408 | |
513
eaddaa0dbbcb
[gaim-migrate @ 523]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
507
diff
changeset
|
409 serv_got_update(c, logged, evil, signon, time_idle, type, 0); |
1 | 410 |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
411 } else if (!strcasecmp(c, "CONFIG")) { |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
412 /* do we want to load the buddy list again here? */ |
318
35796808896a
[gaim-migrate @ 328]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
301
diff
changeset
|
413 c = strtok(NULL,":"); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
414 parse_toc_buddy_list(gc, c, 0); |
1 | 415 } else if (!strcasecmp(c, "ERROR")) { |
301
f905caee43ca
[gaim-migrate @ 311]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
300
diff
changeset
|
416 /* This should be handled by wait_reply |
1 | 417 c = strtok(NULL,":"); |
418 show_error_dialog(c); | |
301
f905caee43ca
[gaim-migrate @ 311]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
300
diff
changeset
|
419 */ |
1 | 420 } else if (!strcasecmp(c, "NICK")) { |
421 c = strtok(NULL,":"); | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
422 g_snprintf(gc->username, sizeof(gc->username), "%s", c); |
1 | 423 } else if (!strcasecmp(c, "IM_IN")) { |
424 char *away, *message; | |
425 int a = 0; | |
426 | |
427 c = strtok(NULL,":"); | |
428 away = strtok(NULL,":"); | |
429 | |
430 message = away; | |
431 | |
432 while(*message && (*message != ':')) | |
433 message++; | |
434 | |
435 message++; | |
436 | |
437 if (!strncasecmp(away, "T", 1)) | |
438 a = 1; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
439 serv_got_im(gc, c, message, a); |
1 | 440 |
441 } else if (!strcasecmp(c, "GOTO_URL")) { | |
442 char *name; | |
443 char *url; | |
444 | |
445 char tmp[256]; | |
446 | |
447 name = strtok(NULL, ":"); | |
448 url = strtok(NULL, ":"); | |
449 | |
450 | |
451 g_snprintf(tmp, sizeof(tmp), "http://%s:%d/%s", toc_addy, aim_port, url); | |
452 /* fprintf(stdout, "Name: %s\n%s\n", name, url); | |
453 printf("%s", grab_url(tmp));*/ | |
454 g_show_info(tmp); | |
455 } else if (!strcasecmp(c, "EVILED")) { | |
456 int lev; | |
457 char *name = NULL; | |
458 | |
459 sscanf(strtok(NULL, ":"), "%d", &lev); | |
460 name = strtok(NULL, ":"); | |
461 | |
462 sprintf(debug_buff,"%s | %d\n", name, lev); | |
463 debug_print(debug_buff); | |
464 | |
465 serv_got_eviled(name, lev); | |
466 | |
467 } else if (!strcasecmp(c, "CHAT_JOIN")) { | |
468 char *name; | |
469 int id; | |
470 | |
471 | |
472 sscanf(strtok(NULL, ":"), "%d", &id); | |
473 name = strtok(NULL, ":"); | |
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
474 serv_got_joined_chat(gc, id, name); |
1 | 475 |
476 } else if (!strcasecmp(c, "DIR_STATUS")) { | |
149 | 477 } else if (!strcasecmp(c, "ADMIN_PASSWD_STATUS")) { |
478 do_error_dialog("Password Change Successeful", "Gaim - Password Change"); | |
1 | 479 } else if (!strcasecmp(c, "CHAT_UPDATE_BUDDY")) { |
480 int id; | |
481 char *in; | |
482 char *buddy; | |
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
483 GSList *bcs = gc->buddy_chats; |
472
6a92cd7322cc
[gaim-migrate @ 482]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
447
diff
changeset
|
484 struct conversation *b = NULL; |
1 | 485 |
486 sscanf(strtok(NULL, ":"), "%d", &id); | |
487 | |
488 in = strtok(NULL, ":"); | |
489 | |
490 while(bcs) { | |
472
6a92cd7322cc
[gaim-migrate @ 482]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
447
diff
changeset
|
491 b = (struct conversation *)bcs->data; |
1 | 492 if (id == b->id) |
493 break; | |
494 bcs = bcs->next; | |
495 b = NULL; | |
496 } | |
497 | |
44 | 498 if (!b) { |
45 | 499 g_free(buf); |
1 | 500 return; |
44 | 501 } |
1 | 502 |
503 | |
504 if (!strcasecmp(in, "T")) { | |
505 while((buddy = strtok(NULL, ":")) != NULL) { | |
506 add_chat_buddy(b, buddy); | |
507 } | |
508 } else { | |
509 while((buddy = strtok(NULL, ":")) != NULL) { | |
510 remove_chat_buddy(b, buddy); | |
511 } | |
512 } | |
513 | |
514 } else if (!strcasecmp(c, "CHAT_LEFT")) { | |
515 int id; | |
516 | |
517 | |
518 sscanf(strtok(NULL, ":"), "%d", &id); | |
519 | |
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
520 serv_got_chat_left(gc, id); |
1 | 521 |
522 | |
523 } else if (!strcasecmp(c, "CHAT_IN")) { | |
524 | |
525 int id, w; | |
526 char *m; | |
527 char *who, *whisper; | |
528 | |
529 | |
530 sscanf(strtok(NULL, ":"), "%d", &id); | |
531 who = strtok(NULL, ":"); | |
532 whisper = strtok(NULL, ":"); | |
533 m = whisper; | |
534 while(*m && (*m != ':')) m++; | |
535 m++; | |
536 | |
537 if (!strcasecmp(whisper, "T")) | |
538 w = 1; | |
539 else | |
540 w = 0; | |
541 | |
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
542 serv_got_chat_in(gc, id, who, w, m); |
1 | 543 |
544 | |
545 } else if (!strcasecmp(c, "CHAT_INVITE")) { | |
546 char *name; | |
547 char *who; | |
548 char *message; | |
549 int id; | |
550 | |
551 | |
552 name = strtok(NULL, ":"); | |
553 sscanf(strtok(NULL, ":"), "%d", &id); | |
554 who = strtok(NULL, ":"); | |
555 message = strtok(NULL, ":"); | |
556 | |
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
557 serv_got_chat_invite(gc, name, id, who, message); |
1 | 558 |
559 | |
560 } else if (!strcasecmp(c, "RVOUS_PROPOSE")) { | |
561 char *user; | |
562 char *uuid; | |
563 char *cookie; | |
564 int seq; | |
565 char *rip, *pip, *vip; | |
566 int port; | |
567 int unk[4]; | |
568 char *messages[4]; | |
569 int subtype, files, totalsize; | |
570 char *name; | |
571 char *tmp; | |
572 int i; | |
573 struct file_transfer *ft; | |
574 | |
575 | |
576 user = strtok(NULL, ":"); | |
577 uuid = strtok(NULL, ":"); | |
578 cookie = strtok(NULL, ":"); | |
579 sscanf(strtok(NULL, ":"), "%d", &seq); | |
580 rip = strtok(NULL, ":"); | |
581 pip = strtok(NULL, ":"); | |
582 vip = strtok(NULL, ":"); | |
583 sscanf(strtok(NULL, ":"), "%d", &port); | |
584 | |
197
24f0fef56a73
[gaim-migrate @ 207]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
196
diff
changeset
|
585 if (!strcmp(uuid, FILE_SEND_UID)) { |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
586 /* we're getting a file */ |
211
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
587 for (i=0; i<4; i++) { |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
588 sscanf(strtok(NULL, ":"), "%d", &unk[i]); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
589 if (unk[i] == 10001) |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
590 break; |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
591 messages[i] = frombase64(strtok(NULL, ":")); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
592 } |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
593 tmp = frombase64(strtok(NULL, ":")); |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
594 subtype = tmp[1]; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
595 files = tmp[3]; /* These are fine */ |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
596 |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
597 totalsize = 0; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
598 totalsize |= (tmp[4] << 24) & 0xff000000; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
599 totalsize |= (tmp[5] << 16) & 0x00ff0000; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
600 totalsize |= (tmp[6] << 8) & 0x0000ff00; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
601 totalsize |= (tmp[7] << 0) & 0x000000ff; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
602 |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
603 name = tmp + 8; |
1 | 604 |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
605 ft = g_new0(struct file_transfer, 1); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
606 |
198
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
607 ft->cookie = g_strdup(cookie); |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
608 ft->ip = g_strdup(pip); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
609 ft->port = port; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
610 if (i) |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
611 ft->message = g_strdup(messages[0]); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
612 else |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
613 ft->message = NULL; |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
614 ft->filename = g_strdup(name); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
615 ft->user = g_strdup(user); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
616 ft->size = totalsize; |
198
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
617 sprintf(ft->UID, "%s", FILE_SEND_UID); |
978
563c409e26a1
[gaim-migrate @ 988]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
976
diff
changeset
|
618 ft->gc = gc; |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
619 |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
620 g_free(tmp); |
1 | 621 |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
622 for (i--; i >= 0; i--) |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
623 g_free(messages[i]); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
624 |
507
d17547ff9c2a
[gaim-migrate @ 517]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
472
diff
changeset
|
625 if (totalsize) /* sanity check */ |
d17547ff9c2a
[gaim-migrate @ 517]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
472
diff
changeset
|
626 accept_file_dialog(ft); |
197
24f0fef56a73
[gaim-migrate @ 207]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
196
diff
changeset
|
627 } else if (!strcmp(uuid, FILE_GET_UID)) { |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
628 /* we're sending a file */ |
211
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
629 for (i=0; i<4; i++) { |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
630 sscanf(strtok(NULL, ":"), "%d", &unk[i]); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
631 if (unk[i] == 10001) |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
632 break; |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
633 messages[i] = frombase64(strtok(NULL, ":")); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
634 } |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
635 tmp = frombase64(strtok(NULL, ":")); |
198
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
636 ft = g_new0(struct file_transfer, 1); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
637 |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
638 ft->cookie = g_strdup(cookie); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
639 ft->ip = g_strdup(pip); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
640 ft->port = port; |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
641 if (i) |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
642 ft->message = g_strdup(messages[0]); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
643 else |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
644 ft->message = NULL; |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
645 ft->user = g_strdup(user); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
646 sprintf(ft->UID, "%s", FILE_GET_UID); |
978
563c409e26a1
[gaim-migrate @ 988]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
976
diff
changeset
|
647 ft->gc = gc; |
198
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
648 |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
649 g_free(tmp); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
650 |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
651 for (i--; i >= 0; i--) |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
652 g_free(messages[i]); |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
653 |
73e9a0bfff62
[gaim-migrate @ 208]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
197
diff
changeset
|
654 accept_file_dialog(ft); |
369
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
351
diff
changeset
|
655 } else if (!strcmp(uuid, VOICE_UID)) { |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
351
diff
changeset
|
656 /* oh goody. voice over ip. fun stuff. */ |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
351
diff
changeset
|
657 |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
658 /* |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
659 } else if (!strcmp(uuid, B_ICON_UID)) { |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
660 } else if (!strcmp(uuid, IMAGE_UID)) { |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
661 */ |
1 | 662 |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
663 } else { |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
664 sprintf(debug_buff,"don't know what to do with %s\n", |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
665 uuid); |
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
666 debug_print(debug_buff); |
211
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
667 tmp = g_malloc(BUF_LEN); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
668 name = frombase64(cookie); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
669 snprintf(tmp, BUF_LEN, "toc_rvous_cancel %s %s %s", |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
670 user, name, uuid); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
671 sflap_send(gc, tmp, strlen(tmp), TYPE_DATA); |
211
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
672 free(name); |
2042a38da38b
[gaim-migrate @ 221]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
208
diff
changeset
|
673 free(tmp); |
196
3042e11c1902
[gaim-migrate @ 206]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
194
diff
changeset
|
674 } |
1 | 675 } else { |
676 sprintf(debug_buff,"don't know what to do with %s\n", c); | |
677 debug_print(debug_buff); | |
678 } | |
679 g_free(buf); | |
680 } | |
681 | |
682 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
683 int toc_signon(struct gaim_connection *gc) |
1 | 684 { |
685 char buf[BUF_LONG]; | |
686 int res; | |
687 struct signon so; | |
688 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
689 sprintf(debug_buff,"State = %d\n", gc->state); |
1 | 690 debug_print(debug_buff); |
691 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
692 if ((res = write(gc->toc_fd, FLAPON, strlen(FLAPON))) < 0) |
1 | 693 return res; |
694 /* Wait for signon packet */ | |
695 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
696 gc->state = STATE_FLAPON; |
1 | 697 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
698 if ((res = wait_reply(gc, buf, sizeof(buf)) < 0)) |
1 | 699 return res; |
700 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
701 if (gc->state != STATE_SIGNON_REQUEST) { |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
702 sprintf(debug_buff, "State should be %d, but is %d instead\n", STATE_SIGNON_REQUEST, gc->state); |
1 | 703 debug_print(debug_buff); |
704 return -1; | |
705 } | |
706 | |
707 /* Compose a response */ | |
708 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
709 g_snprintf(so.username, sizeof(so.username), "%s", gc->username); |
1 | 710 so.ver = ntohl(1); |
711 so.tag = ntohs(1); | |
712 so.namelen = htons(strlen(so.username)); | |
713 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
714 sflap_send(gc, (char *)&so, ntohs(so.namelen) + 8, TYPE_SIGNON); |
1 | 715 |
716 g_snprintf(buf, sizeof(buf), | |
717 "toc_signon %s %d %s %s %s \"%s\"", | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
718 login_host, login_port, normalize(gc->username), roast_password(gc->password), LANGUAGE, REVISION); |
1 | 719 |
720 sprintf(debug_buff,"Send: %s\n", buf); | |
721 debug_print(debug_buff); | |
722 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
723 return sflap_send(gc, buf, -1, TYPE_DATA); |
1 | 724 } |
725 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
726 int toc_wait_signon(struct gaim_connection *gc) |
1 | 727 { |
728 /* Wait for the SIGNON to be approved */ | |
351
22161278657c
[gaim-migrate @ 361]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
729 char buf[BUF_LONG]; |
1 | 730 int res; |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
731 res = wait_reply(gc, buf, sizeof(buf)); |
1 | 732 if (res < 0) |
733 return res; | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
734 if (gc->state != STATE_SIGNON_ACK) { |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
735 sprintf(debug_buff, "State should be %d, but is %d instead\n",STATE_SIGNON_ACK, gc->state); |
1 | 736 debug_print(debug_buff); |
737 return -1; | |
738 } | |
739 return 0; | |
740 } | |
741 | |
742 #ifdef _WIN32 | |
743 gint win32_read() | |
744 { | |
745 int ret; | |
746 struct fd_set fds; | |
747 struct timeval tv; | |
748 | |
749 FD_ZERO(&fds); | |
750 | |
751 tv.tv_sec = 0; | |
752 tv.tv_usec = 200; | |
753 | |
754 FD_SET(toc_fd, &fds); | |
755 | |
756 ret = select(toc_fd + 1, &fds, NULL, NULL, &tv); | |
757 | |
758 if (ret == 0) { | |
759 return TRUE; | |
760 } | |
761 | |
762 toc_callback(NULL, 0, (GdkInputCondition)0); | |
763 return TRUE; | |
764 } | |
765 #endif | |
766 | |
767 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
768 char *toc_wait_config(struct gaim_connection *gc) |
1 | 769 { |
770 /* Waits for configuration packet, returning the contents of the packet */ | |
351
22161278657c
[gaim-migrate @ 361]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
771 static char buf[BUF_LONG]; |
1 | 772 int res; |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
773 res = wait_reply(gc, buf, sizeof(buf)); |
1 | 774 if (res < 0) |
775 return NULL; | |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
776 /* Apparently, the toc_config is optional. *VERY* Optional |
285 | 777 */ |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
778 if (gc->state != STATE_CONFIG) { |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
779 res = 0; |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
780 } else { |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
781 res = 1; |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
782 } |
1 | 783 /* At this point, it's time to setup automatic handling of incoming packets */ |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
784 gc->state = STATE_ONLINE; |
1 | 785 #ifdef _WIN32 |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
786 win32_r = gtk_timeout_add(1000, (GtkFunction)win32_read, NULL); |
1 | 787 #else |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
788 gc->inpa = gdk_input_add(gc->toc_fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, toc_callback, gc); |
1 | 789 #endif |
300
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
790 if (res) |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
791 return buf; |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
792 else |
b32c83750104
[gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
793 return NULL; |
1 | 794 } |
795 | |
710
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
796 void toc_build_config(char *s, int len, gboolean show) |
1 | 797 { |
940 | 798 GSList *grp = groups; |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
799 GList *mem; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
800 struct group *g; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
801 struct buddy *b; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
802 GList *plist = permit; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
803 GList *dlist = deny; |
1 | 804 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
805 int pos=0; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
806 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
807 if (!permdeny) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
808 permdeny = 1; |
1 | 809 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
810 pos += g_snprintf(&s[pos], len - pos, "m %d\n", permdeny); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
811 while(grp) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
812 g = (struct group *)grp->data; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
813 pos += g_snprintf(&s[pos], len - pos, "g %s\n", g->name); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
814 mem = g->members; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
815 while(mem) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
816 b = (struct buddy *)mem->data; |
710
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
817 pos += g_snprintf(&s[pos], len - pos, "b %s%s%s\n", b->name, |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
818 show ? ":" : "", show ? b->show : ""); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
819 mem = mem->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
820 } |
940 | 821 grp = g_slist_next(grp); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
822 } |
1 | 823 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
824 while(plist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
825 pos += g_snprintf(&s[pos], len - pos, "p %s\n", (char *)plist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
826 plist=plist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
827 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
828 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
829 while(dlist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
830 pos += g_snprintf(&s[pos], len - pos, "d %s\n", (char *)dlist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
831 dlist=dlist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
676
diff
changeset
|
832 } |
1 | 833 } |
834 | |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
835 void parse_toc_buddy_list(struct gaim_connection *gc, char *config, int from_do_import) |
1 | 836 { |
837 char *c; | |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
838 char current[256]; |
1 | 839 char *name; |
840 GList *bud; | |
228 | 841 int how_many = 0; |
842 | |
1 | 843 bud = NULL; |
844 | |
332
b573f33c5e0e
[gaim-migrate @ 342]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
318
diff
changeset
|
845 if (config != NULL) { |
b573f33c5e0e
[gaim-migrate @ 342]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
318
diff
changeset
|
846 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
847 /* skip "CONFIG:" (if it exists)*/ |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
848 c = strncmp(config + sizeof(struct sflap_hdr),"CONFIG:",strlen("CONFIG:"))? |
1 | 849 strtok(config, "\n"): |
850 strtok(config + sizeof(struct sflap_hdr)+strlen("CONFIG:"), "\n"); | |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
851 do { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
852 if (c == NULL) |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
853 break; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
854 if (*c == 'g') { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
855 strncpy(current,c+2, sizeof(current)); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
856 add_group(current); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
857 how_many++; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
858 } else if (*c == 'b' && !find_buddy(c+2)) { |
710
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
859 char nm[80], sw[80], *tmp = c+2; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
860 int i = 0; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
861 while (*tmp != ':' && *tmp) |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
862 nm[i++] = *tmp++; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
863 if (*tmp == ':') *tmp++ = '\0'; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
864 nm[i] = '\0'; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
865 i = 0; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
866 while (*tmp) sw[i++] = *tmp++; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
867 sw[i] = '\0'; |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
868 if (!find_buddy(nm)) |
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
869 add_buddy(current, nm, sw); |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
870 how_many++; |
710
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
681
diff
changeset
|
871 |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
872 bud = g_list_append(bud, c+2); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
873 } else if (*c == 'p') { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
874 GList *d = permit; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
875 char *n; |
863
55194c5f338f
[gaim-migrate @ 873]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
793
diff
changeset
|
876 name = g_malloc(strlen(c+2) + 2); |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
877 g_snprintf(name, strlen(c+2) + 1, "%s", c+2); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
878 n = g_strdup(normalize(name)); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
879 while (d) { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
880 if (!strcasecmp(n, normalize(d->data))) |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
881 break; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
882 d = d->next; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
883 } |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
884 g_free(n); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
885 if (!d) |
762
977048924ce1
[gaim-migrate @ 772]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
761
diff
changeset
|
886 permit = g_list_append(permit, name); |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
887 } else if (*c == 'd') { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
888 GList *d = deny; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
889 char *n; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
890 name = g_malloc(strlen(c+2) + 2); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
891 g_snprintf(name, strlen(c+2) + 1, "%s", c+2); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
892 n = g_strdup(normalize(name)); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
893 while (d) { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
894 if (!strcasecmp(n, normalize(d->data))) |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
895 break; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
896 d = d->next; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
897 } |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
898 g_free(n); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
899 if (!d) |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
900 deny = g_list_append(deny, name); |
793
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
901 } else if (!strncmp("toc", c, 3)) { |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
902 sscanf(c + strlen(c) - 1, "%d", &permdeny); |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
903 sprintf(debug_buff, "permdeny: %d\n", permdeny); |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
904 debug_print(debug_buff); |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
905 if (permdeny == 0) |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
906 permdeny = 1; |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
907 } else if (*c == 'm') { |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
908 sscanf(c + 2, "%d", &permdeny); |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
909 sprintf(debug_buff, "permdeny: %d\n", permdeny); |
57cc66fbfa8e
[gaim-migrate @ 803]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
774
diff
changeset
|
910 debug_print(debug_buff); |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
911 if (permdeny == 0) |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
912 permdeny = 1; |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
913 } |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
914 } while((c=strtok(NULL,"\n"))); |
1 | 915 #if 0 |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
916 fprintf(stdout, "Sending message '%s'\n",buf); |
1 | 917 #endif |
681
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
918 |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
919 if (bud != NULL) serv_add_buddies(bud); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
920 serv_set_permit_deny(); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
921 if (blist) { |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
922 build_edit_tree(); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
923 build_permit_tree(); |
5422dbecd861
[gaim-migrate @ 691]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
924 } |
332
b573f33c5e0e
[gaim-migrate @ 342]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
318
diff
changeset
|
925 } |
b573f33c5e0e
[gaim-migrate @ 342]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
318
diff
changeset
|
926 |
228 | 927 /* perhaps the server dropped the buddy list, try importing from |
928 cache */ | |
929 | |
296
a88b889b692b
[gaim-migrate @ 306]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
285
diff
changeset
|
930 if ( how_many == 0 && !from_do_import ) { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
931 do_import( (GtkWidget *) NULL, gc ); |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
932 } else if ( gc && (bud_list_cache_exists(gc) == FALSE) ) { |
229 | 933 do_export( (GtkWidget *) NULL, 0 ); |
228 | 934 } |
1 | 935 } |
981
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
936 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
937 static char *toc_name() { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
938 return "TOC"; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
939 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
940 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
941 static void toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
942 char buf[MSG_LEN - 7]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
943 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
944 escape_text(message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
945 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
946 message, ((away) ? " auto" : "")); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
947 sflap_send(gc, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
948 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
949 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
950 static void toc_get_info(struct gaim_connection *g, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
951 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
952 g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
953 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
954 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
955 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
956 static void toc_get_dir(struct gaim_connection *g, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
957 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
958 g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
959 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
960 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
961 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
962 static void toc_set_dir(struct gaim_connection *g, char *first, char *middle, char *last, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
963 char *maiden, char *city, char *state, char *country, int web) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
964 char buf2[BUF_LEN*4], buf[BUF_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
965 g_snprintf(buf2, sizeof(buf2), "%s:%s:%s:%s:%s:%s:%s:%s", first, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
966 middle, last, maiden, city, state, country, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
967 (web == 1) ? "Y" : ""); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
968 escape_text(buf2); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
969 g_snprintf(buf, sizeof(buf), "toc_set_dir %s", buf2); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
970 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
971 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
972 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
973 static void toc_dir_search(struct gaim_connection *g, char *first, char *middle, char *last, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
974 char *maiden, char *city, char *state, char *country, char *email) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
975 char buf[BUF_LONG]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
976 g_snprintf(buf, sizeof(buf)/2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
977 last, maiden, city, state, country, email); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
978 sprintf(debug_buff,"Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
979 city, state, country); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
980 debug_print(debug_buff); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
981 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
982 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
983 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
984 static void toc_set_away(struct gaim_connection *g, char *message) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
985 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
986 if (message) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
987 escape_text(message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
988 g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
989 } else |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
990 g_snprintf(buf, MSG_LEN, "toc_set_away \"\""); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
991 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
992 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
993 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
994 static void toc_set_info(struct gaim_connection *g, char *info) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
995 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
996 escape_text(info); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
997 g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", info); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
998 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
999 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1000 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1001 static void toc_change_passwd(struct gaim_connection *g, char *orig, char *new) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1002 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1003 g_snprintf(buf, BUF_LONG, "toc_change_passwd %s %s", orig, new); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1004 sflap_send(g, buf, strlen(buf), TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1005 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1006 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1007 static void toc_add_buddy(struct gaim_connection *g, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1008 char buf[1024]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1009 g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1010 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1011 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1012 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1013 static void toc_add_buddies(struct gaim_connection *g, GList *buddies) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1014 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1015 int n; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1016 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1017 n = g_snprintf(buf, sizeof(buf), "toc_add_buddy"); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1018 while (buddies) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1019 if (strlen(normalize(buddies->data)) > MSG_LEN - n - 16) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1020 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1021 n = g_snprintf(buf, sizeof(buf), "toc_add_buddy"); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1022 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1023 n += g_snprintf(buf + n, sizeof(buf)-n, " %s", normalize(buddies->data)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1024 buddies = buddies->next; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1025 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1026 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1027 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1028 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1029 static void toc_remove_buddy(struct gaim_connection *g, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1030 char buf[1024]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1031 g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1032 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1033 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1034 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1035 static void toc_set_idle(struct gaim_connection *g, int time) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1036 char buf[256]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1037 g_snprintf(buf, sizeof(buf), "toc_set_idle %d", time); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1038 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1039 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1040 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1041 static void toc_warn(struct gaim_connection *g, char *name, int anon) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1042 char send[256]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1043 g_snprintf(send, 255, "toc_evil %s %s", name, ((anon) ? "anon" : "norm")); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1044 sflap_send(g, send, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1045 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1046 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1047 static void toc_accept_chat(struct gaim_connection *g, int i) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1048 char buf[256]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1049 g_snprintf(buf, 255, "toc_chat_accept %d", i); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1050 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1051 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1052 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1053 static void toc_join_chat(struct gaim_connection *g, int exchange, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1054 char buf[BUF_LONG]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1055 g_snprintf(buf, sizeof(buf)/2, "toc_chat_join %d \"%s\"", exchange, name); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1056 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1057 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1058 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1059 static void toc_chat_invite(struct gaim_connection *g, int id, char *message, char *name) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1060 char buf[BUF_LONG]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1061 g_snprintf(buf, sizeof(buf)/2, "toc_chat_invite %d \"%s\" %s", id, message, normalize(name)); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1062 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1063 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1064 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1065 static void toc_chat_leave(struct gaim_connection *g, int id) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1066 char buf[256]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1067 g_snprintf(buf, 255, "toc_chat_leave %d", id); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1068 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1069 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1070 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1071 static void toc_chat_whisper(struct gaim_connection *g, int id, char *who, char *message) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1072 char buf2[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1073 g_snprintf(buf2, sizeof(buf2), "toc_chat_whisper %d %s \"%s\"", id, who, message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1074 sflap_send(g, buf2, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1075 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1076 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1077 static void toc_chat_send(struct gaim_connection *g, int id, char *message) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1078 char buf[MSG_LEN]; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1079 escape_text(message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1080 g_snprintf(buf, sizeof(buf), "toc_chat_send %d \"%s\"",id, message); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1081 sflap_send(g, buf, -1, TYPE_DATA); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1082 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1083 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1084 static void toc_keepalive(struct gaim_connection *gc) { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1085 sflap_send(gc, "", 0, TYPE_KEEPALIVE); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1086 } |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1087 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1088 struct prpl *toc_init() { |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1089 struct prpl *ret = g_new0(struct prpl, 1); |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1090 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1091 ret->protocol = PROTO_TOC; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1092 ret->name = toc_name; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1093 ret->login = toc_login; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1094 ret->close = toc_close; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1095 ret->send_im = toc_send_im; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1096 ret->set_info = toc_set_info; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1097 ret->get_info = toc_get_info; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1098 ret->set_away = toc_set_away; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1099 ret->get_away_msg = NULL; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1100 ret->set_dir = toc_set_dir; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1101 ret->get_dir = toc_get_dir; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1102 ret->dir_search = toc_dir_search; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1103 ret->set_idle = toc_set_idle; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1104 ret->change_passwd = toc_change_passwd; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1105 ret->add_buddy = toc_add_buddy; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1106 ret->add_buddies = toc_add_buddies; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1107 ret->remove_buddy = toc_remove_buddy; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1108 ret->add_permit = NULL; /* FIXME */ |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1109 ret->add_deny = NULL; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1110 ret->warn = toc_warn; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1111 ret->accept_chat = toc_accept_chat; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1112 ret->join_chat = toc_join_chat; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1113 ret->chat_invite = toc_chat_invite; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1114 ret->chat_leave = toc_chat_leave; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1115 ret->chat_whisper = toc_chat_whisper; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1116 ret->chat_send = toc_chat_send; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1117 ret->keepalive = toc_keepalive; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1118 |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1119 return ret; |
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
980
diff
changeset
|
1120 } |