Mercurial > pidgin
comparison src/oscar.c @ 1635:67060e06b234
[gaim-migrate @ 1645]
i think oscar blocking works?
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 23 Mar 2001 12:15:02 +0000 |
parents | f47f75819e8c |
children | d7e380618fd5 |
comparison
equal
deleted
inserted
replaced
1634:d029dc28a61e | 1635:67060e06b234 |
---|---|
2374 gtk_entry_set_text(GTK_ENTRY(entry), user->proto_opt[USEROPT_SOCKSPORT]); | 2374 gtk_entry_set_text(GTK_ENTRY(entry), user->proto_opt[USEROPT_SOCKSPORT]); |
2375 } | 2375 } |
2376 gtk_widget_show(entry); | 2376 gtk_widget_show(entry); |
2377 } | 2377 } |
2378 | 2378 |
2379 static void oscar_add_permit(struct gaim_connection *gc, char *who) { | |
2380 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2381 if (gc->permdeny != 3) return; | |
2382 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, who); | |
2383 } | |
2384 | |
2385 static void oscar_add_deny(struct gaim_connection *gc, char *who) { | |
2386 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2387 if (gc->permdeny != 4) return; | |
2388 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, who); | |
2389 } | |
2390 | |
2391 static void oscar_rem_permit(struct gaim_connection *gc, char *who) { | |
2392 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2393 if (gc->permdeny != 3) return; | |
2394 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITREMOVE, who); | |
2395 } | |
2396 | |
2397 static void oscar_rem_deny(struct gaim_connection *gc, char *who) { | |
2398 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2399 if (gc->permdeny != 4) return; | |
2400 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYREMOVE, who); | |
2401 } | |
2402 | |
2403 static void oscar_set_permit_deny(struct gaim_connection *gc) { | 2379 static void oscar_set_permit_deny(struct gaim_connection *gc) { |
2404 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 2380 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
2405 GSList *list; | 2381 GSList *list; |
2406 char buf[MAXMSGLEN]; | 2382 char buf[MAXMSGLEN]; |
2407 int at; | 2383 int at; |
2413 case 2: | 2389 case 2: |
2414 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gc->username); | 2390 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gc->username); |
2415 break; | 2391 break; |
2416 case 3: | 2392 case 3: |
2417 list = gc->permit; | 2393 list = gc->permit; |
2418 at = g_snprintf(buf, sizeof(buf), "%s", gc->username); | 2394 at = 0; |
2419 while (list) { | 2395 while (list) { |
2420 at += g_snprintf(buf + at, sizeof(buf) - at, "&%s", (char *)list->data); | 2396 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); |
2421 list = list->next; | 2397 list = list->next; |
2422 } | 2398 } |
2423 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf); | 2399 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf); |
2424 break; | 2400 break; |
2425 case 4: | 2401 case 4: |
2426 list = gc->deny; | 2402 list = gc->deny; |
2427 at = g_snprintf(buf, sizeof(buf), "%s", gc->username); | 2403 at = 0; |
2428 while (list) { | 2404 while (list) { |
2429 at += g_snprintf(buf + at, sizeof(buf) - at, "&%s", (char *)list->data); | 2405 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); |
2430 list = list->next; | 2406 list = list->next; |
2431 } | 2407 } |
2432 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf); | 2408 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf); |
2433 break; | 2409 break; |
2434 default: | 2410 default: |
2435 break; | 2411 break; |
2436 } | 2412 } |
2413 } | |
2414 | |
2415 static void oscar_add_permit(struct gaim_connection *gc, char *who) { | |
2416 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2417 if (gc->permdeny != 3) return; | |
2418 oscar_set_permit_deny(gc); | |
2419 } | |
2420 | |
2421 static void oscar_add_deny(struct gaim_connection *gc, char *who) { | |
2422 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2423 if (gc->permdeny != 4) return; | |
2424 oscar_set_permit_deny(gc); | |
2425 } | |
2426 | |
2427 static void oscar_rem_permit(struct gaim_connection *gc, char *who) { | |
2428 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2429 if (gc->permdeny != 3) return; | |
2430 oscar_set_permit_deny(gc); | |
2431 } | |
2432 | |
2433 static void oscar_rem_deny(struct gaim_connection *gc, char *who) { | |
2434 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | |
2435 if (gc->permdeny != 4) return; | |
2436 oscar_set_permit_deny(gc); | |
2437 } | 2437 } |
2438 | 2438 |
2439 static void oscar_draw_new_user(GtkWidget *box) | 2439 static void oscar_draw_new_user(GtkWidget *box) |
2440 { | 2440 { |
2441 GtkWidget *label; | 2441 GtkWidget *label; |