diff options
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r-- | modules/commands/cs_set.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 0c5e9b6c6..f4c7e176d 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1198,6 +1198,8 @@ class CSSet : public Module CommandCSSetSuccessor commandcssetsuccessor; CommandCSSetNoexpire commandcssetnoexpire; + bool persist_lower_ts; + public: CSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), noautoop(this, "NOAUTOOP"), peace(this, "PEACE"), @@ -1214,6 +1216,11 @@ class CSSet : public Module { } + void OnReload(Configuration::Conf *conf) anope_override + { + persist_lower_ts = conf->GetModule(this)->Get<bool>("persist_lower_ts"); + } + void OnCreateChan(ChannelInfo *ci) anope_override { ci->bantype = Config->GetModule(this)->Get<int>("defbantype", "2"); @@ -1296,7 +1303,7 @@ class CSSet : public Module void OnJoinChannel(User *u, Channel *c) anope_override { - if (c->ci && persist.HasExt(c->ci) && c->creation_time > c->ci->time_registered) + if (persist_lower_ts && c->ci && persist.HasExt(c->ci) && c->creation_time > c->ci->time_registered) { Log(LOG_DEBUG) << "Changing TS of " << c->name << " from " << c->creation_time << " to " << c->ci->time_registered; c->creation_time = c->ci->time_registered; |