comparison src/server.c @ 242:14fc16f579c8

[gaim-migrate @ 252] More updates to oscar.c (et al.) to use libfaim. Lots of good stuff now. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 20 May 2000 07:58:50 +0000
parents 6ced2f1c8b24
children 3414ff74cb0f
comparison
equal deleted inserted replaced
241:452993e3cdd2 242:14fc16f579c8
51 51
52 void serv_close() 52 void serv_close()
53 { 53 {
54 #ifndef USE_OSCAR 54 #ifndef USE_OSCAR
55 toc_close(); 55 toc_close();
56 #else
57 oscar_close();
56 #endif 58 #endif
57 gtk_timeout_remove(idle_timer); 59 gtk_timeout_remove(idle_timer);
58 idle_timer = -1; 60 idle_timer = -1;
59 } 61 }
60 62
242 { 244 {
243 char buf[1024]; 245 char buf[1024];
244 #ifndef USE_OSCAR 246 #ifndef USE_OSCAR
245 g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name)); 247 g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name));
246 sflap_send(buf, -1, TYPE_DATA); 248 sflap_send(buf, -1, TYPE_DATA);
249 #else
250 aim_add_buddy(gaim_sess, gaim_conn, name);
247 #endif 251 #endif
248 } 252 }
249 253
250 void serv_add_buddies(GList *buddies) 254 void serv_add_buddies(GList *buddies)
251 { 255 {
263 ++num; 267 ++num;
264 n += g_snprintf(buf + n, sizeof(buf) - n, " %s", normalize(buddies->data)); 268 n += g_snprintf(buf + n, sizeof(buf) - n, " %s", normalize(buddies->data));
265 buddies = buddies->next; 269 buddies = buddies->next;
266 } 270 }
267 sflap_send(buf, -1, TYPE_DATA); 271 sflap_send(buf, -1, TYPE_DATA);
272 #else
273 /* oscar you have to add them one name at a time, except at login */
274 while(buddies) {
275 serv_add_buddy((char *)buddies->data);
276 buddies = buddies->next;
277 }
268 #endif 278 #endif
269 } 279 }
270 280
271 281
272 void serv_remove_buddy(char *name) 282 void serv_remove_buddy(char *name)
273 { 283 {
274 char buf[1024]; 284 char buf[1024];
275 #ifndef USE_OSCAR 285 #ifndef USE_OSCAR
276 g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name)); 286 g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name));
277 sflap_send(buf, -1, TYPE_DATA); 287 sflap_send(buf, -1, TYPE_DATA);
288 #else
289 aim_remove_buddy(gaim_sess, gaim_conn, name);
278 #endif 290 #endif
279 } 291 }
280 292
281 void serv_add_permit(char *name) 293 void serv_add_permit(char *name)
282 { 294 {
357 g_free(send); 369 g_free(send);
358 #endif 370 #endif
359 } 371 }
360 372
361 void serv_build_config(char *buf, int len) { 373 void serv_build_config(char *buf, int len) {
362 #ifndef USE_OSCAR
363 toc_build_config(buf, len); 374 toc_build_config(buf, len);
364 #endif
365 } 375 }
366 376
367 377
368 void serv_save_config() 378 void serv_save_config()
369 { 379 {