Add ban enable switch. Default is disabled.
authorMartin Johansson <martin@fatbob.nu>
Tue, 6 Mar 2012 19:39:19 +0000 (20:39 +0100)
committerMartin Johansson <martin@fatbob.nu>
Tue, 6 Mar 2012 19:39:19 +0000 (20:39 +0100)
src/conf.c
src/conf.h

index 0ac0bc40841856b126800d92216771732fb6407d..f2baa3106de0d943126bb20fdf5fa1fa8c32b7e3 100644 (file)
@@ -256,6 +256,13 @@ bool_t getBoolConf(param_t param)
                else
                        return config_setting_get_bool(setting);
                break;
                else
                        return config_setting_get_bool(setting);
                break;
+       case ENABLE_BAN:
+               setting = config_lookup(&configuration, "enable_ban");
+               if (!setting)
+                       return false;
+               else
+                       return config_setting_get_bool(setting);
+               break;
        default:
                doAssert(false);
        }
        default:
                doAssert(false);
        }
index 92dd6a775a1dc0c920cc90f390c0c74e499b800c..36115b0f108922fbc4ef46153e1dca908cab9950 100644 (file)
@@ -51,6 +51,7 @@ typedef enum param {
        ADMIN_PASSPHRASE,
        BAN_LENGTH,
        ALLOW_TEXTMESSAGE,
        ADMIN_PASSPHRASE,
        BAN_LENGTH,
        ALLOW_TEXTMESSAGE,
+       ENABLE_BAN,
 } param_t;
 
 typedef struct {
 } param_t;
 
 typedef struct {