mirror of
git://erdgeist.org/opentracker
synced 2025-04-21 13:42:01 +02:00

added a config file parser added tracker id changed WANT_CLOSED_TRACKER and WANT_BLACKLIST into WANT_ACCESS_WHITE and WANT_ACCESS_BLACK changed WANT_TRACKER_SYNC to WANT_SYNC_BATCH and added WANT_SYNC_LIVE added an option to switch off fullscrapes cleaned up many internal hardcoded values, like PROTO_FLAG,
35 lines
955 B
C
35 lines
955 B
C
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
|
|
It is considered beerware. Prost. Skol. Cheers or whatever.
|
|
|
|
$id$ */
|
|
|
|
#ifndef __OT_ACCESSLIST_H__
|
|
#define __OT_ACCESSLIST_H__
|
|
|
|
#if defined ( WANT_ACCESSLIST_BLACK ) && defined (WANT_ACCESSLIST_WHITE )
|
|
#error WANT_ACCESSLIST_BLACK and WANT_ACCESSLIST_WHITE are exclusive.
|
|
#endif
|
|
|
|
#if defined ( WANT_ACCESSLIST_BLACK ) || defined (WANT_ACCESSLIST_WHITE )
|
|
#define WANT_ACCESSLIST
|
|
void accesslist_init( );
|
|
int accesslist_hashisvalid( ot_hash *hash );
|
|
|
|
extern char *g_accesslist_filename;
|
|
|
|
#else
|
|
#define accesslist_init( accesslist_filename )
|
|
#define accesslist_hashisvalid( hash ) 1
|
|
#endif
|
|
|
|
typedef enum {
|
|
OT_PERMISSION_MAY_FULLSCRAPE,
|
|
OT_PERMISSION_MAY_SYNC,
|
|
OT_PERMISSION_MAY_STAT,
|
|
OT_PERMISSION_MAY_LIVESYNC
|
|
} ot_permissions;
|
|
|
|
int accesslist_blessip( char * ip, ot_permissions permissions );
|
|
int accesslist_isblessed( char * ip, ot_permissions permissions );
|
|
|
|
#endif
|