#define DEFAULT_MAX_CLIENTS 10
#define DEFAULT_MAX_BANDWIDTH 48000
#define DEFAULT_BINDPORT 64738
+#define DEFAULT_BAN_LENGTH (60*60)
const char defaultconfig[] = DEFAULT_CONFIG;
return "";
}
break;
+ case ADMIN_PASSPHRASE:
+ setting = config_lookup(&configuration, "admin_password");
+ if (!setting)
+ return "";
+ else {
+ if ((strsetting = config_setting_get_string(setting)) != NULL)
+ return strsetting;
+ else
+ return "";
+ }
+ break;
case BINDADDR:
setting = config_lookup(&configuration, "bindaddr");
if (!setting)
return config_setting_get_int(setting);
}
break;
+ case BAN_LENGTH:
+ setting = config_lookup(&configuration, "ban_length");
+ if (!setting)
+ return DEFAULT_BAN_LENGTH;
+ else {
+ return config_setting_get_int(setting);
+ }
+ break;
case MAX_BANDWIDTH:
setting = config_lookup(&configuration, "max_bandwidth");
if (!setting)