- if ( (!csp->plist) || ((data = csp->plist->f) == NULL) )
- {
- /* Disabled. */
- return;
- }
-
- /* If the hostname is on our list for blocking then mark it
- * as a host to block from. (This may be later changed if the
- * host is also on the list-to-allow list).
- */
-
- for (i=0; (i < 50) && (i < size); i++) /* avoid scanning binary data! */
- {
- if ((unsigned int)(buff[i])>127)
- {
-#ifdef POPUP_VERBOSE
- fprintf(logfp, "I'm not scanning binary stuff! (%i)\n",buff[i]);
-#endif
- return;
- }
- }
-
-
- for (cur = data->blocked ; cur ; cur = cur->next)
- {
- if ( host_name != 0 )
- {
- if ( strcmp( cur->host_name, host_name ) == 0 )
- {
-#ifdef POPUP_VERBOSE
- fprintf(logfp, "Blocking %s\n", host_name );
-#endif
- found = 1;
- }
- }
- }
-
- /* Force match if we're supposed to nuke _all_ popups, globally. */
- if ( kill_all_popups != 0 )
- {
-#ifdef POPUP_VERBOSE
- fprintf(logfp, "Indescriminatly nuking popups..\n" );
-#endif
- found = 1;
- }
- /* an exception-from blocking should still be an exception! by BREITENB NEW! */
-
-
- /* Now, if its allowed adjust the filtering, so it _doesn't_ happen. */
- for (cur = data->allowed ; cur ; cur = cur->next)
- {
- if ( host_name != 0 )
- {
- if ( strcmp( cur->host_name, host_name ) == 0 )
- {
-#ifdef POPUP_VERBOSE
- fprintf(logfp, "Reversing block decision for %s\n", host_name );
-#endif
- found = 0;
- }
- }
- }
-
- if ( found == 0)
- {
-#ifdef POPUP_VERBOSE
- fprintf(logfp, "Allowing %s\n", host_name );
-#endif
- return;
- }
-