comparison src/list.c @ 2597:2ced57c58653

[gaim-migrate @ 2610] you're the one that i want (you're the one i wa-ant) oo oo oo you're all i need oh yes indeed committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 24 Oct 2001 10:23:49 +0000
parents 2dd86a1af92b
children b0c5770156e1
comparison
equal deleted inserted replaced
2596:35c23df11d16 2597:2ced57c58653
773 } 773 }
774 774
775 g_free(g_screenname); 775 g_free(g_screenname);
776 g_free(file); 776 g_free(file);
777 } 777 }
778
779 static gboolean is_blocked(struct buddy *b)
780 {
781 struct gaim_connection *gc = b->gc;
782
783 if (gc->permdeny == PERMIT_ALL)
784 return FALSE;
785
786 if (gc->permdeny == PERMIT_NONE) {
787 if (g_strcasecmp(b->name, gc->displayname))
788 return TRUE;
789 else
790 return FALSE;
791 }
792
793 if (gc->permdeny == PERMIT_SOME) {
794 char *x = g_strdup(normalize(b->name));
795 GSList *s = gc->permit;
796 while (s) {
797 if (!g_strcasecmp(x, normalize(s->data)))
798 break;
799 s = s->next;
800 }
801 g_free(x);
802 if (s)
803 return FALSE;
804 return TRUE;
805 }
806
807 if (gc->permdeny == DENY_SOME) {
808 char *x = g_strdup(normalize(b->name));
809 GSList *s = gc->deny;
810 while (s) {
811 if (!g_strcasecmp(x, normalize(s->data)))
812 break;
813 s = s->next;
814 }
815 g_free(x);
816 if (s)
817 return TRUE;
818 return FALSE;
819 }
820
821 return FALSE;
822 }
823
824 void signoff_blocked(struct gaim_connection *gc)
825 {
826 GSList *g = gc->groups;
827 while (g) {
828 GSList *m = ((struct group *)g->data)->members;
829 while (m) {
830 struct buddy *b = m->data;
831 if (is_blocked(b))
832 serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0);
833 m = m->next;
834 }
835 g = g->next;
836 }
837 }