projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7707f9a
)
added configvalue for mininum time at time bans
author
NurPech
<nurpech@nurpech.de>
Sun, 19 May 2013 22:21:03 +0000
(
00:21
+0200)
committer
NurPech
<nurpech@nurpech.de>
Sun, 19 May 2013 22:22:55 +0000
(
00:22
+0200)
src/chanserv.c
patch
|
blob
|
history
srvx.conf.example
patch
|
blob
|
history
diff --git
a/src/chanserv.c
b/src/chanserv.c
index d99ed500156bbe6f9c9309562920ba34fe271ee2..7a620326a28578406bd18700c63f054a011acb1d 100644
(file)
--- a/
src/chanserv.c
+++ b/
src/chanserv.c
@@
-43,6
+43,7
@@
#define KEY_DNR_EXPIRE_FREQ "dnr_expire_freq"
#define KEY_MAX_CHAN_USERS "max_chan_users"
#define KEY_MAX_CHAN_BANS "max_chan_bans"
#define KEY_DNR_EXPIRE_FREQ "dnr_expire_freq"
#define KEY_MAX_CHAN_USERS "max_chan_users"
#define KEY_MAX_CHAN_BANS "max_chan_bans"
+#define KEY_MIN_TIME_BANS "min_time_bans"
#define KEY_NICK "nick"
#define KEY_OLD_CHANSERV_NAME "old_chanserv_name"
#define KEY_8BALL_RESPONSES "8ball"
#define KEY_NICK "nick"
#define KEY_OLD_CHANSERV_NAME "old_chanserv_name"
#define KEY_8BALL_RESPONSES "8ball"
@@
-581,6
+582,7
@@
static struct
unsigned int max_owned;
unsigned int max_chan_users;
unsigned int max_chan_bans;
unsigned int max_owned;
unsigned int max_chan_users;
unsigned int max_chan_bans;
+ unsigned int min_time_bans;
unsigned int max_userinfo_length;
unsigned int revoke_mode_a;
unsigned int max_userinfo_length;
unsigned int revoke_mode_a;
@@
-3476,7
+3478,7
@@
eject_user(struct userNode *user, struct chanNode *channel, unsigned int argc, c
{
duration = ParseInterval(argv[2]);
{
duration = ParseInterval(argv[2]);
- if(duration <
15
)
+ if(duration <
chanserv_conf.min_time_bans
)
{
reply("CSMSG_DURATION_TOO_LOW");
free(ban);
{
reply("CSMSG_DURATION_TOO_LOW");
free(ban);
@@
-7857,6
+7859,8
@@
chanserv_conf_read(void)
chanserv_conf.max_chan_users = str ? atoi(str) : 512;
str = database_get_data(conf_node, KEY_MAX_CHAN_BANS, RECDB_QSTRING);
chanserv_conf.max_chan_bans = str ? atoi(str) : 512;
chanserv_conf.max_chan_users = str ? atoi(str) : 512;
str = database_get_data(conf_node, KEY_MAX_CHAN_BANS, RECDB_QSTRING);
chanserv_conf.max_chan_bans = str ? atoi(str) : 512;
+ str = database_get_data(conf_node, KEY_MIN_TIME_BANS, RECDB_QSTRING);
+ chanserv_conf.min_time_bans = str ? atoi(str) : 5;
str = database_get_data(conf_node, KEY_MAX_USERINFO_LENGTH, RECDB_QSTRING);
chanserv_conf.max_userinfo_length = str ? atoi(str) : 400;
str = database_get_data(conf_node, KEY_NICK, RECDB_QSTRING);
str = database_get_data(conf_node, KEY_MAX_USERINFO_LENGTH, RECDB_QSTRING);
chanserv_conf.max_userinfo_length = str ? atoi(str) : 400;
str = database_get_data(conf_node, KEY_NICK, RECDB_QSTRING);
diff --git
a/srvx.conf.example
b/srvx.conf.example
index 84409edc0479db95737f784eee4730566c922ed1..f7b15f64a5e81187649ed032501c688d13244766 100644
(file)
--- a/
srvx.conf.example
+++ b/
srvx.conf.example
@@
-225,6
+225,8
@@
"max_chan_users" "512";
// maximum bans on a channel banlist
"max_chan_bans" "512";
"max_chan_users" "512";
// maximum bans on a channel banlist
"max_chan_bans" "512";
+ //min time of timebans
+ "min_time_bans" "5";
// maximum length of a user's infoline
"max_userinfo_length" "400";
// If DynLimit is on and there are N users in the channel, ChanServ will
// maximum length of a user's infoline
"max_userinfo_length" "400";
// If DynLimit is on and there are N users in the channel, ChanServ will