Mercurial > pidgin
changeset 679:71b2477033cb
[gaim-migrate @ 689]
mods to permit/deny stuff
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 15 Aug 2000 02:40:53 +0000 |
parents | c72f58814e9f |
children | acdbee5a9492 |
files | libfaim/README.gaim src/prefs.c src/server.c |
diffstat | 3 files changed, 18 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/libfaim/README.gaim Tue Aug 15 01:29:35 2000 +0000 +++ b/libfaim/README.gaim Tue Aug 15 02:40:53 2000 +0000 @@ -69,8 +69,8 @@ - Oscar doesn't do whispering in chat rooms any more (and hasn't for quite a while, evidently). So if you want to "whisper" to someone, just IM them. -- The permit list stuff is really warped. It works, but if you change it while -you're signed on, you'll probably get kicked off. Don't ask me why. +- The permit/deny list stuff is really warped. I'm probably going to comment it +out soon and try to figure out what's going on. - "Allow anyone" and "Deny some" serve the same function. That's not a bug. But "Allow anyone" works all the time (?) and "Deny some" doesn't work some of the
--- a/src/prefs.c Tue Aug 15 01:29:35 2000 +0000 +++ b/src/prefs.c Tue Aug 15 02:40:53 2000 +0000 @@ -335,7 +335,7 @@ static GtkWidget *permtree = NULL; -void build_permit_tree() +static void build_deny_tree() { GtkWidget *ti; GtkWidget *sub; @@ -548,7 +548,7 @@ gtk_widget_show(xbox); permtree = gtk_tree_new(); - build_permit_tree(); + build_deny_tree(); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(xbox), permtree); gtk_signal_connect(GTK_OBJECT(permtree), "destroy", GTK_SIGNAL_FUNC(permdest), 0); gtk_widget_show(permtree); @@ -568,6 +568,12 @@ gtk_widget_show(prefdialog); } +void build_permit_tree() +{ + if (permtree) + deny_page(); +} + static void convo_page() { GtkWidget *parent;
--- a/src/server.c Tue Aug 15 01:29:35 2000 +0000 +++ b/src/server.c Tue Aug 15 02:40:53 2000 +0000 @@ -380,11 +380,7 @@ if (!USE_OSCAR) { char buf[MSG_LEN]; int at; - int cnt; GList *list; - GList *mem; - struct buddy *b; - struct group *g; switch (permdeny) { case PERMIT_ALL: @@ -437,40 +433,11 @@ sflap_send(buf, -1, TYPE_DATA); } break; - case PERMIT_BUDDY: - /* toc_add_permit <bud> */ - /* if there are no buddies this is the same as PERMIT_NONE */ - at = g_snprintf(buf, sizeof(buf), "toc_add_permit"); - list = groups; - cnt = 0; - while (list) { - g = (struct group *)list->data; - mem = g->members; - while (mem) { - b = (struct buddy *)mem->data; - at += g_snprintf(&buf[at], sizeof(buf) - at, " %s", normalize(b->name)); - cnt++; - mem = mem->next; - } - list = list->next; - } - if (cnt) { - sflap_send(buf, -1, TYPE_DATA); - } else { - sprintf(buf, "toc_add_deny %s", current_user->username); - sflap_send(buf, -1, TYPE_DATA); - sprintf(buf, "toc_add_permit"); - sflap_send(buf, -1, TYPE_DATA); - } } } else { int at; GList *list; - GList *mem; - struct buddy *b; - struct group *g; char buf[MSG_LEN]; - int cnt; switch (permdeny) { /* aim_bos_changevisibility(gaim_sess, gaim_conn, type, list) */ @@ -487,21 +454,15 @@ case PERMIT_SOME: /* PERMIT <permit> */ /* if permit is empty this is the same as PERMIT_NONE */ - if (permit) { - at = 0; - list = permit; - while (list) { - at += g_snprintf(&buf[at], sizeof(buf) - at, "%s", list->data); - list = list->next; - if (list) - at += g_snprintf(&buf[at], sizeof(buf) - at, "&"); - } - aim_bos_changevisibility(gaim_sess, gaim_conn, - AIM_VISIBILITYCHANGE_PERMITADD, buf); - } else { - aim_bos_changevisibility(gaim_sess, gaim_conn, - AIM_VISIBILITYCHANGE_PERMITADD, current_user->username); + at = g_snprintf(buf, sizeof(buf), "%s", current_user->username); + list = permit; + while (list) { + at += g_snprintf(&buf[at], sizeof(buf) - at, "&"); + at += g_snprintf(&buf[at], sizeof(buf) - at, "%s", list->data); + list = list->next; } + aim_bos_changevisibility(gaim_sess, gaim_conn, + AIM_VISIBILITYCHANGE_PERMITADD, buf); break; case DENY_SOME: /* DENY <deny> */ @@ -522,33 +483,6 @@ AIM_VISIBILITYCHANGE_DENYADD, current_user->username); } break; - case PERMIT_BUDDY: - /* PERMIT <bud> */ - /* if there are no buddies this is the same as PERMIT_NONE */ - at = 0; - list = groups; - cnt = 0; - while (list) { - g = (struct group *)list->data; - mem = g->members; - while (mem) { - b = (struct buddy *)mem->data; - if (at) - at += g_snprintf(&buf[at], sizeof(buf) - at, "&"); - at += g_snprintf(&buf[at], sizeof(buf) - at, "%s", b->name); - cnt++; - mem = mem->next; - } - list = list->next; - } - if (cnt) { - aim_bos_changevisibility(gaim_sess, gaim_conn, - AIM_VISIBILITYCHANGE_PERMITADD, buf); - } else { - aim_bos_changevisibility(gaim_sess, gaim_conn, - AIM_VISIBILITYCHANGE_PERMITADD, current_user->username); - } - break; } } }