projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd00d18
)
Add ban enable switch. Default is disabled.
author
Martin Johansson
<martin@fatbob.nu>
Tue, 6 Mar 2012 19:39:19 +0000
(20:39 +0100)
committer
Martin Johansson
<martin@fatbob.nu>
Tue, 6 Mar 2012 19:39:19 +0000
(20:39 +0100)
src/conf.c
patch
|
blob
|
history
src/conf.h
patch
|
blob
|
history
diff --git
a/src/conf.c
b/src/conf.c
index 0ac0bc40841856b126800d92216771732fb6407d..f2baa3106de0d943126bb20fdf5fa1fa8c32b7e3 100644
(file)
--- a/
src/conf.c
+++ b/
src/conf.c
@@
-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);
}
diff --git
a/src/conf.h
b/src/conf.h
index 92dd6a775a1dc0c920cc90f390c0c74e499b800c..36115b0f108922fbc4ef46153e1dca908cab9950 100644
(file)
--- a/
src/conf.h
+++ b/
src/conf.h
@@
-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 {