mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Tweak the whowas config defaults
- Decrease the default number of nick groups. - Increase the days to keep records for. - Enable update on nick change by default. - Remove the upper bounds on the fields.
This commit is contained in:
parent
a84010cd64
commit
c0a68cea9c
@ -940,24 +940,25 @@
|
||||
# #
|
||||
<whowas
|
||||
# groupsize: Maximum entries per nick shown when performing
|
||||
# a /WHOWAS <nick>.
|
||||
# a /WHOWAS <nick>. Defaults to 10.
|
||||
groupsize="10"
|
||||
|
||||
# maxgroups: Maximum number of nickgroups that can be added to
|
||||
# the list so that /WHOWAS does not use a lot of resources on
|
||||
# large networks.
|
||||
maxgroups="100000"
|
||||
# large networks. Defaults to 10000.
|
||||
maxgroups="10000"
|
||||
|
||||
# maxkeep: Maximum time a nick is kept in the whowas list
|
||||
# before being pruned. Time may be specified in seconds,
|
||||
# or in the following format: 1y2w3d4h5m6s. Minimum is
|
||||
# 1 hour.
|
||||
maxkeep="3d"
|
||||
# 1 hour. Defaults to 7 days.
|
||||
maxkeep="7d"
|
||||
|
||||
# nickupdate: Whether to update the WHOWAS database on nick
|
||||
# change as well as quit. This can significantly increase the
|
||||
# memory usage of your IRC server.
|
||||
nickupdate="no">
|
||||
# memory usage of your IRC server so it is not recommended
|
||||
# for large networks. Defaults to yes.
|
||||
nickupdate="yes">
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#- BAN OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||
# #
|
||||
|
@ -470,12 +470,12 @@ public:
|
||||
void ReadConfig(ConfigStatus& status) override
|
||||
{
|
||||
const auto& tag = ServerInstance->Config->ConfValue("whowas");
|
||||
unsigned int NewGroupSize = tag->getNum<unsigned int>("groupsize", 10, 0, 10000);
|
||||
unsigned int NewMaxGroups = tag->getNum<unsigned int>("maxgroups", 10240, 0, 1000000);
|
||||
unsigned int NewMaxKeep = static_cast<unsigned int>(tag->getDuration("maxkeep", 3600, 3600));
|
||||
nickupdate = tag->getBool("nickupdate");
|
||||
const auto groupsize = tag->getNum<unsigned int>("groupsize", 10);
|
||||
const auto maxgroups = tag->getNum<unsigned int>("maxgroups", 10000);
|
||||
const auto maxkeep = static_cast<unsigned int>(tag->getDuration("maxkeep", 7*24*60*60, 60*60));
|
||||
nickupdate = tag->getBool("nickupdate", true);
|
||||
|
||||
cmd.manager.UpdateConfig(NewGroupSize, NewMaxGroups, NewMaxKeep);
|
||||
cmd.manager.UpdateConfig(groupsize, maxgroups, maxkeep);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user