diff options
29 files changed, 92 insertions, 92 deletions
diff --git a/include/account.h b/include/account.h index a773f77a6..be130ea95 100644 --- a/include/account.h +++ b/include/account.h @@ -53,7 +53,7 @@ public: Anope::string last_usermask; /* Last uncloaked usermask, requires nickserv/auspex to see */ Anope::string last_realhost; - time_t time_registered = Anope::CurTime; + time_t registered = Anope::CurTime; time_t last_seen = Anope::CurTime; /* Account this nick is tied to. Multiple nicks can be tied to a single account. */ @@ -149,7 +149,7 @@ public: /* Last time an email was sent to this user */ time_t lastmail = 0; /* The time this account was registered */ - time_t time_registered = Anope::CurTime; + time_t registered = Anope::CurTime; MemoInfo memos; std::map<Anope::string, Anope::string> last_modes; diff --git a/include/channels.h b/include/channels.h index 08f8756db..9d1c5b738 100644 --- a/include/channels.h +++ b/include/channels.h @@ -48,7 +48,7 @@ public: /* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */ Serialize::Reference<ChannelInfo> ci; /* When the channel was created */ - time_t creation_time; + time_t created; /* If the channel has just been created in a netjoin */ bool syncing = false; /* Is configured in the conf as a channel bots should be in */ diff --git a/include/regchannel.h b/include/regchannel.h index 156b48628..6cde7acf6 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -79,7 +79,7 @@ public: Anope::string name; /* Channel name */ Anope::string desc; - time_t time_registered; + time_t registered; time_t last_used; Anope::string last_topic; /* The last topic that was set on this channel */ diff --git a/modules/chanserv/chanserv.cpp b/modules/chanserv/chanserv.cpp index a79534d93..8f3ec68e4 100644 --- a/modules/chanserv/chanserv.cpp +++ b/modules/chanserv/chanserv.cpp @@ -417,7 +417,7 @@ public: continue; bool c; - ci->c = Channel::FindOrCreate(ci->name, c, ci->time_registered); + ci->c = Channel::FindOrCreate(ci->name, c, ci->registered); ci->c->syncing |= created; if (perm) @@ -452,10 +452,10 @@ public: void OnJoinChannel(User *u, Channel *c) override { - if (always_lower && c->ci && c->creation_time > c->ci->time_registered) + if (always_lower && c->ci && c->created > c->ci->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; + Log(LOG_DEBUG) << "Changing TS of " << c->name << " from " << c->created << " to " << c->ci->registered; + c->created = c->ci->registered; IRCD->SendChannel(c); c->Reset(); } @@ -463,7 +463,7 @@ public: EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) override { - if (!always_lower && Anope::CurTime == c->creation_time && c->ci && setter.GetUser() && !setter.GetUser()->server->IsULined()) + if (!always_lower && Anope::CurTime == c->created && c->ci && setter.GetUser() && !setter.GetUser()->server->IsULined()) { ChanUserContainer *cu = c->FindUser(setter.GetUser()); ChannelMode *cm = ModeManager::FindChannelModeByName("OP"); diff --git a/modules/chanserv/cs_clone.cpp b/modules/chanserv/cs_clone.cpp index bad74d304..64858fd1b 100644 --- a/modules/chanserv/cs_clone.cpp +++ b/modules/chanserv/cs_clone.cpp @@ -169,7 +169,7 @@ public: delete target_ci; target_ci = new ChannelInfo(*ci); target_ci->name = target; - target_ci->time_registered = Anope::CurTime; + target_ci->registered = Anope::CurTime; (*RegisteredChannelList)[target_ci->name] = target_ci; target_ci->c = Channel::Find(target_ci->name); diff --git a/modules/chanserv/cs_info.cpp b/modules/chanserv/cs_info.cpp index 8d9b0c04f..619a0721c 100644 --- a/modules/chanserv/cs_info.cpp +++ b/modules/chanserv/cs_info.cpp @@ -53,7 +53,7 @@ public: if (!ci->desc.empty()) info[_("Description")] = ci->desc; - info[_("Registered")] = Anope::strftime(ci->time_registered, source.GetAccount()); + info[_("Registered")] = Anope::strftime(ci->registered, source.GetAccount()); info[_("Last used")] = Anope::strftime(ci->last_used, source.GetAccount()); if (show_all) diff --git a/modules/chanserv/cs_set.cpp b/modules/chanserv/cs_set.cpp index d5b7994de..b2287988a 100644 --- a/modules/chanserv/cs_set.cpp +++ b/modules/chanserv/cs_set.cpp @@ -1241,10 +1241,10 @@ public: void OnJoinChannel(User *u, Channel *c) override { - if (u->server != Me && persist_lower_ts && c->ci && persist.HasExt(c->ci) && c->creation_time > c->ci->time_registered) + if (u->server != Me && persist_lower_ts && c->ci && persist.HasExt(c->ci) && c->created > c->ci->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; + Log(LOG_DEBUG) << "Changing TS of " << c->name << " from " << c->created << " to " << c->ci->registered; + c->created = c->ci->registered; IRCD->SendChannel(c); c->Reset(); } diff --git a/modules/database/db_atheme.cpp b/modules/database/db_atheme.cpp index fccef4b36..2eb8642aa 100644 --- a/modules/database/db_atheme.cpp +++ b/modules/database/db_atheme.cpp @@ -882,7 +882,7 @@ private: auto mlock_key = row.Get(); // May not exist. auto *ci = new ChannelInfo(channel); - ci->time_registered = regtime; + ci->registered = regtime; ci->last_used = used; // No equivalent: elnv @@ -1322,8 +1322,8 @@ private: } na = new NickAlias(nick, nc); - na->time_registered = regtime; - na->last_seen = lastseen ? regtime : na->time_registered; + na->registered = regtime; + na->last_seen = lastseen ? regtime : na->registered; auto *data = userdata.Get(nc); if (data) @@ -1375,7 +1375,7 @@ private: nc = new NickCore(display); nc->email = email; - nc->time_registered = regtime; + nc->registered = regtime; ApplyPassword(nc, flags, pass); // No equivalent: bglmNQrS diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index cb25d410b..113e580e2 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -617,7 +617,7 @@ static void LoadNicks() for (int c; (c = getc_db(f)) == 1;) { Anope::string nick, last_usermask, last_realname, last_quit; - time_t time_registered, last_seen; + time_t registered, last_seen; READ(read_string(nick, f)); READ(read_string(last_usermask, f)); @@ -626,7 +626,7 @@ static void LoadNicks() int32_t tmp32; READ(read_int32(&tmp32, f)); - time_registered = tmp32; + registered = tmp32; READ(read_int32(&tmp32, f)); last_seen = tmp32; @@ -672,7 +672,7 @@ static void LoadNicks() na->last_usermask = last_usermask; na->last_realname = last_realname; na->last_quit = last_quit; - na->time_registered = time_registered; + na->registered = registered; na->last_seen = last_seen; if (tmpu16 & OLD_NS_NO_EXPIRE) @@ -785,7 +785,7 @@ static void LoadChannels() int32_t tmp32; READ(read_int32(&tmp32, f)); - ci->time_registered = tmp32; + ci->registered = tmp32; READ(read_int32(&tmp32, f)); ci->last_used = tmp32; diff --git a/modules/nickserv/nickserv.cpp b/modules/nickserv/nickserv.cpp index a78e73251..8c77019ab 100644 --- a/modules/nickserv/nickserv.cpp +++ b/modules/nickserv/nickserv.cpp @@ -625,7 +625,7 @@ public: else { time_t unconfirmed_expire = Config->GetModule("ns_register").Get<time_t>("unconfirmedexpire", "1d"); - info[_("Expires")] = Anope::strftime(na->time_registered + unconfirmed_expire, source.GetAccount()); + info[_("Expires")] = Anope::strftime(na->registered + unconfirmed_expire, source.GetAccount()); } } }; diff --git a/modules/nickserv/ns_group.cpp b/modules/nickserv/ns_group.cpp index d84b8b703..6f6469396 100644 --- a/modules/nickserv/ns_group.cpp +++ b/modules/nickserv/ns_group.cpp @@ -51,7 +51,7 @@ public: } na = new NickAlias(nick, target->nc); - na->time_registered = na->last_seen = Anope::CurTime; + na->registered = na->last_seen = Anope::CurTime; if (u != NULL) { @@ -351,7 +351,7 @@ public: else if (!nickserv_expire || Anope::NoExpire) ; else if (na2->nc->HasExt("UNCONFIRMED") && unconfirmed_expire) - expires = Anope::strftime(na2->time_registered + unconfirmed_expire, source.GetAccount()); + expires = Anope::strftime(na2->registered + unconfirmed_expire, source.GetAccount()); else expires = Anope::strftime(na2->last_seen + nickserv_expire, source.GetAccount()); diff --git a/modules/nickserv/ns_info.cpp b/modules/nickserv/ns_info.cpp index 4637bb06e..254a928ac 100644 --- a/modules/nickserv/ns_info.cpp +++ b/modules/nickserv/ns_info.cpp @@ -116,8 +116,8 @@ public: info[_("Last seen address")] = na->last_realhost; } - info[_("Account registered")] = Anope::strftime(na->nc->time_registered, source.GetAccount()); - info[_("Nick registered")] = Anope::strftime(na->time_registered, source.GetAccount()); + info[_("Account registered")] = Anope::strftime(na->nc->registered, source.GetAccount()); + info[_("Nick registered")] = Anope::strftime(na->registered, source.GetAccount()); if (!nick_online) info[_("Last seen")] = Anope::strftime(na->last_seen, source.GetAccount()); diff --git a/modules/nickserv/ns_register.cpp b/modules/nickserv/ns_register.cpp index 55f79772d..60444765f 100644 --- a/modules/nickserv/ns_register.cpp +++ b/modules/nickserv/ns_register.cpp @@ -413,10 +413,10 @@ public: else u->SendMessage(NickServ, _("Your email address is not confirmed. To confirm it, follow the instructions that were emailed to you.")); const NickAlias *this_na = u->AccountNick(); - time_t time_registered = Anope::CurTime - this_na->time_registered; + time_t registered = Anope::CurTime - this_na->registered; time_t unconfirmed_expire = Config->GetModule(this).Get<time_t>("unconfirmedexpire", "1d"); - if (unconfirmed_expire > time_registered) - u->SendMessage(NickServ, _("Your account will expire, if not confirmed, in %s."), Anope::Duration(unconfirmed_expire - time_registered, u->Account()).c_str()); + if (unconfirmed_expire > registered) + u->SendMessage(NickServ, _("Your account will expire, if not confirmed, in %s."), Anope::Duration(unconfirmed_expire - registered, u->Account()).c_str()); } } @@ -425,7 +425,7 @@ public: if (unconfirmed.HasExt(na->nc)) { time_t unconfirmed_expire = Config->GetModule(this).Get<time_t>("unconfirmedexpire", "1d"); - if (unconfirmed_expire && Anope::CurTime - na->time_registered >= unconfirmed_expire) + if (unconfirmed_expire && Anope::CurTime - na->registered >= unconfirmed_expire) expire = true; } } diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index cd1a582b9..39ae522f3 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -51,7 +51,7 @@ public: void SendModeInternal(const MessageSource &source, Channel *chan, const Anope::string &modes, const std::vector<Anope::string> &values) override { auto params = values; - params.insert(params.begin(), { chan->name, Anope::ToString(chan->creation_time), modes }); + params.insert(params.begin(), { chan->name, Anope::ToString(chan->created), modes }); Uplink::SendInternal({}, source, "MODE", params); } @@ -157,7 +157,7 @@ public: /* JOIN - SJOIN */ void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { - Uplink::Send(user, "SJOIN", c->creation_time, c->name); + Uplink::Send(user, "SJOIN", c->created, c->name); if (status) { /* First save the channel status incase uc->Status == status */ @@ -267,7 +267,7 @@ public: void SendChannel(Channel *c) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), ""); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), ""); } void SendLogin(User *u, NickAlias *) override diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 71f5611fd..f7309bbab 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -43,7 +43,7 @@ public: void SendInvite(const MessageSource &source, const Channel *c, User *u) override { - Uplink::Send(source, "INVITE", u->GetUID(), c->name, c->creation_time); + Uplink::Send(source, "INVITE", u->GetUID(), c->name, c->created); } void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) override @@ -98,7 +98,7 @@ public: void SendJoin(User *u, Channel *c, const ChannelStatus *status) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), u->GetUID()); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), u->GetUID()); /* * Note that we can send this with the SJOIN but choose not to @@ -225,12 +225,12 @@ public: void SendChannel(Channel *c) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), ""); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), ""); } void SendTopic(const MessageSource &source, Channel *c) override { - Uplink::Send(source, "TBURST", c->creation_time, c->name, c->topic_ts, c->topic_setter, c->topic); + Uplink::Send(source, "TBURST", c->created, c->name, c->topic_ts, c->topic_setter, c->topic); } void SendForceNickChange(User *u, const Anope::string &newnick, time_t when) override @@ -454,7 +454,7 @@ struct IRCDMessageMLock final // Mode lock string is not what we say it is? if (modes != params[3]) - Uplink::Send("MLOCK", c->creation_time, c->name, Anope::CurTime, modes); + Uplink::Send("MLOCK", c->created, c->name, Anope::CurTime, modes); } } }; @@ -814,14 +814,14 @@ public: if (modelocks && Servers::Capab.count("MLOCK")) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); - Uplink::Send("MLOCK", c->creation_time, c->ci->name, Anope::CurTime, modes); + Uplink::Send("MLOCK", c->created, c->ci->name, Anope::CurTime, modes); } } void OnDelChan(ChannelInfo *ci) override { if (ci->c && Servers::Capab.count("MLOCK")) - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, Anope::CurTime, ""); + Uplink::Send("MLOCK", ci->c->created, ci->name, Anope::CurTime, ""); } EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) override @@ -831,7 +831,7 @@ public: if (cm && ci->c && modelocks && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK")) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "") + cm->mchar; - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, Anope::CurTime, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, Anope::CurTime, modes); } return EVENT_CONTINUE; @@ -844,7 +844,7 @@ public: if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK")) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, ""); - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, Anope::CurTime, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, Anope::CurTime, modes); } return EVENT_CONTINUE; diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index 46ee5158c..6665a4581 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -335,7 +335,7 @@ public: void SendInvite(const MessageSource &source, const Channel *c, User *u) override { - Uplink::Send(source, "INVITE", u->GetUID(), c->name, c->creation_time); + Uplink::Send(source, "INVITE", u->GetUID(), c->name, c->created); } void SendTopic(const MessageSource &source, Channel *c) override @@ -351,7 +351,7 @@ public: if (c->topic_time > ts) ts = Anope::CurTime; /* But don't modify c->topic_ts, it should remain set to the real TS we want as ci->last_topic_time pulls from it */ - Uplink::Send(source, "FTOPIC", c->name, c->creation_time, ts, c->topic_setter, c->topic); + Uplink::Send(source, "FTOPIC", c->name, c->created, ts, c->topic_setter, c->topic); } } @@ -437,7 +437,7 @@ public: void SendModeInternal(const MessageSource &source, Channel *chan, const Anope::string &modes, const std::vector<Anope::string> &values) override { auto params = values; - params.insert(params.begin(), { chan->name, Anope::ToString(chan->creation_time), modes }); + params.insert(params.begin(), { chan->name, Anope::ToString(chan->created), modes }); Uplink::SendInternal({}, source, "FMODE", params); } @@ -486,7 +486,7 @@ public: void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { - Uplink::Send("FJOIN", c->name, c->creation_time, "+" + c->GetModes(true, true), "," + user->GetUID()); + Uplink::Send("FJOIN", c->name, c->created, "+" + c->GetModes(true, true), "," + user->GetUID()); /* Note that we can send this with the FJOIN but choose not to * because the mode stacker will handle this and probably will * merge these modes with +nrt and other mlocked modes @@ -631,7 +631,7 @@ public: void SendChannel(Channel *c) override { - Uplink::Send("FJOIN", c->name, c->creation_time, "+" + c->GetModes(true, true), ""); + Uplink::Send("FJOIN", c->name, c->created, "+" + c->GetModes(true, true), ""); } void SendSASLMessage(const SASL::Message &message) override @@ -1952,7 +1952,7 @@ private: // Mode lock string is not what we say it is? if (!modes.equals_cs(value)) - Uplink::Send("METADATA", c->name, c->creation_time, "mlock", modes); + Uplink::Send("METADATA", c->name, c->created, "mlock", modes); } static void HandleModules(Server *s, const Anope::string &value) @@ -2070,7 +2070,7 @@ private: auto localstate = c->ci->HasExt("TOPICLOCK"); auto remotestate = Anope::Convert<bool>(value, false); if (localstate != remotestate) - Uplink::Send("METADATA", c->name, c->creation_time, "topiclock", !!localstate); + Uplink::Send("METADATA", c->name, c->created, "topiclock", !!localstate); } public: @@ -2317,7 +2317,7 @@ struct IRCDMessageLMode final // If the TS is greater than ours, we drop the mode and don't pass it anywhere. auto chants = IRCD->ExtractTimestamp(params[1]); - if (chants > chan->creation_time) + if (chants > chan->created) return; auto *cm = ModeManager::FindChannelModeByChar(params[2][0]); @@ -2594,7 +2594,7 @@ class ProtoInspIRCd final static void SendChannelMetadata(Channel *c, const Anope::string &metadataname, const Anope::string &value) { - Uplink::Send("METADATA", c->name, c->creation_time, metadataname, value); + Uplink::Send("METADATA", c->name, c->created, metadataname, value); } public: diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index 0f2a1ef10..989cfcbc6 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -61,7 +61,7 @@ public: void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), user->GetUID()); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), user->GetUID()); if (status) { /* First save the channel status incase uc->Status == status */ diff --git a/modules/protocol/solanum.cpp b/modules/protocol/solanum.cpp index 4a4789258..0b0dbfd30 100644 --- a/modules/protocol/solanum.cpp +++ b/modules/protocol/solanum.cpp @@ -451,7 +451,7 @@ public: if (modelocks && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); - Uplink::Send("MLOCK", c->creation_time, c->ci->name, modes); + Uplink::Send("MLOCK", c->created, c->ci->name, modes); } } @@ -462,7 +462,7 @@ public: if (cm && ci->c && modelocks && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "") + cm->mchar; - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, modes); } return EVENT_CONTINUE; @@ -475,7 +475,7 @@ public: if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, ""); - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, modes); } return EVENT_CONTINUE; diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp index 4a2b881a0..014ac4d9f 100644 --- a/modules/protocol/unrealircd.cpp +++ b/modules/protocol/unrealircd.cpp @@ -183,7 +183,7 @@ private: /* JOIN */ void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), user->GetUID()); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), user->GetUID()); if (status) { /* First save the channel status incase uc->Status == status */ @@ -383,7 +383,7 @@ private: void SendChannel(Channel *c) override { - Uplink::Send("SJOIN", c->creation_time, c->name, "+" + c->GetModes(true, true), ""); + Uplink::Send("SJOIN", c->created, c->name, "+" + c->GetModes(true, true), ""); } void SendSASLMessage(const SASL::Message &message) override @@ -1489,7 +1489,7 @@ struct IRCDMessageSJoin final { Channel *c = Channel::Find(params[1]); - if (!c || c->creation_time != ts) + if (!c || c->created != ts) return; ChannelMode *ban = ModeManager::FindChannelModeByName("BAN"), @@ -1803,7 +1803,7 @@ public: if (Servers::Capab.count("MLOCK") > 0 && modelocks) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); - Uplink::Send("MLOCK", c->creation_time, c->ci->name, modes); + Uplink::Send("MLOCK", c->created, c->ci->name, modes); } } @@ -1813,14 +1813,14 @@ public: if (!ci->c || !modelocks || !Servers::Capab.count("MLOCK")) return; Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, modes); } void OnDelChan(ChannelInfo *ci) override { if (!ci->c || !Servers::Capab.count("MLOCK")) return; - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, ""); + Uplink::Send("MLOCK", ci->c->created, ci->name, ""); } EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) override @@ -1830,7 +1830,7 @@ public: if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "") + cm->mchar; - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, modes); } return EVENT_CONTINUE; @@ -1843,7 +1843,7 @@ public: if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, ""); - Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); + Uplink::Send("MLOCK", ci->c->created, ci->name, modes); } return EVENT_CONTINUE; diff --git a/modules/rpc/rpc_data.cpp b/modules/rpc/rpc_data.cpp index 2edb4ea11..71c0fee71 100644 --- a/modules/rpc/rpc_data.cpp +++ b/modules/rpc/rpc_data.cpp @@ -77,7 +77,7 @@ public: root .Reply("display", nc->display) .Reply("lastmail", nc->lastmail) - .Reply("registered", nc->time_registered) + .Reply("registered", nc->registered) .Reply("uniqueid", nc->GetId()); if (nc->email.empty()) @@ -97,7 +97,7 @@ public: { auto &nick = nicks.ReplyMap(na->nick); nick.Reply("lastseen", na->last_seen) - .Reply("registered", nc->time_registered); + .Reply("registered", nc->registered); SaveData::Serialize(na, na, nick.ReplyMap("extensions")); if (na->HasVHost()) @@ -196,7 +196,7 @@ public: static void GetInfo(Channel *c, RPC::Map &root) { - root.Reply("created", c->creation_time) + root.Reply("created", c->created) .Reply("name", c->name) .Reply("registered", !!c->ci); diff --git a/modules/webcpanel/pages/chanserv/set.cpp b/modules/webcpanel/pages/chanserv/set.cpp index fbf6ff34a..c7163a605 100644 --- a/modules/webcpanel/pages/chanserv/set.cpp +++ b/modules/webcpanel/pages/chanserv/set.cpp @@ -99,7 +99,7 @@ bool WebCPanel::ChanServ::Set::OnRequest(HTTPProvider *server, const Anope::stri replacements["FOUNDER"] = ci->GetFounder()->display; if (ci->GetSuccessor()) replacements["SUCCESSOR"] = ci->GetSuccessor()->display; - replacements["TIME_REGISTERED"] = Anope::strftime(ci->time_registered, na->nc); + replacements["REGISTERED"] = Anope::strftime(ci->registered, na->nc); replacements["LAST_USED"] = Anope::strftime(ci->last_used, na->nc); replacements["ESCAPED_CHANNEL"] = HTTPUtils::URLEncode(chname); diff --git a/modules/webcpanel/pages/nickserv/info.cpp b/modules/webcpanel/pages/nickserv/info.cpp index 9846f6b9c..467c128f1 100644 --- a/modules/webcpanel/pages/nickserv/info.cpp +++ b/modules/webcpanel/pages/nickserv/info.cpp @@ -120,7 +120,7 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str replacements["DISPLAY"] = na->nc->display; if (!na->nc->email.empty()) replacements["EMAIL"] = na->nc->email; - replacements["TIME_REGISTERED"] = Anope::strftime(na->nc->time_registered, na->nc); + replacements["REGISTERED"] = Anope::strftime(na->nc->registered, na->nc); if (na->HasVHost()) replacements["VHOST"] = na->GetVHostMask(); Anope::string *greet = na->nc->GetExt<Anope::string>("greet"); diff --git a/modules/webcpanel/templates/chanserv/set.html b/modules/webcpanel/templates/chanserv/set.html index 3c63294ac..27ea05654 100644 --- a/modules/webcpanel/templates/chanserv/set.html +++ b/modules/webcpanel/templates/chanserv/set.html @@ -31,7 +31,7 @@ {END IF} <tr> <td>Time registered</td> - <td>{TIME_REGISTERED}</td> + <td>{REGISTERED}</td> </tr> <tr> <td>Last used</td> diff --git a/modules/webcpanel/templates/nickserv/info.html b/modules/webcpanel/templates/nickserv/info.html index fa279ac99..4f1f477fc 100644 --- a/modules/webcpanel/templates/nickserv/info.html +++ b/modules/webcpanel/templates/nickserv/info.html @@ -28,7 +28,7 @@ {END IF} <tr> <td>Time registered:</td> - <td>{TIME_REGISTERED}</td> + <td>{REGISTERED}</td> </tr> {IF EXISTS VHOST} <tr> diff --git a/src/channels.cpp b/src/channels.cpp index 3e7fb6e50..b8fa74443 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -30,7 +30,7 @@ std::vector<Channel *> Channel::deleting; Channel::Channel(const Anope::string &nname, time_t ts) : name(nname) - , creation_time(ts) + , created(ts) { if (nname.empty()) throw CoreException("A channel without a name ?"); @@ -610,15 +610,15 @@ void Channel::SetModesInternal(MessageSource &source, const Anope::string &modes { if (!ts) ; - else if (ts > this->creation_time) + else if (ts > this->created) { - Log(LOG_DEBUG) << "Dropping mode " << modes << " on " << this->name << ", " << ts << " > " << this->creation_time; + Log(LOG_DEBUG) << "Dropping mode " << modes << " on " << this->name << ", " << ts << " > " << this->created; return; } - else if (ts < this->creation_time) + else if (ts < this->created) { - Log(LOG_DEBUG) << "Changing TS of " << this->name << " from " << this->creation_time << " to " << ts; - this->creation_time = ts; + Log(LOG_DEBUG) << "Changing TS of " << this->name << " from " << this->created << " to " << ts; + this->created = ts; this->Reset(); } diff --git a/src/messages.cpp b/src/messages.cpp index 726e0f953..312b867a3 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -110,7 +110,7 @@ void Join::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, users.emplace_back(ChannelStatus(), user); Channel *chan = Channel::Find(channel); - SJoin(source, channel, chan ? chan->creation_time : Anope::CurTime, "", {}, users); + SJoin(source, channel, chan ? chan->created : Anope::CurTime, "", {}, users); } } @@ -126,13 +126,13 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co else if (!ts) ; /* Our creation time is newer than what the server gave us, so reset the channel to the older time */ - else if (c->creation_time > ts) + else if (c->created > ts) { - c->creation_time = ts; + c->created = ts; c->Reset(); } /* Their TS is newer, don't accept any modes from them */ - else if (ts > c->creation_time) + else if (ts > c->created) keep_their_modes = false; /* Update the modes for the channel */ @@ -144,7 +144,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co for (const auto &[status, u] : users) { - keep_their_modes = ts <= c->creation_time; // OnJoinChannel can call modules which can modify this channel's ts + keep_their_modes = ts <= c->created; // OnJoinChannel can call modules which can modify this channel's ts if (c->FindUser(u)) continue; diff --git a/src/nickalias.cpp b/src/nickalias.cpp index ac33e836a..95deca85f 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -158,7 +158,7 @@ void NickAlias::Type::Serialize(const Serializable *obj, Serialize::Data &data) data.Store("last_realname", na->last_realname); data.Store("last_usermask", na->last_usermask); data.Store("last_realhost", na->last_realhost); - data.Store("time_registered", na->time_registered); + data.Store("time_registered", na->registered); data.Store("last_seen", na->last_seen); data.Store("ncid", na->nc->GetId()); @@ -211,7 +211,7 @@ Serializable *NickAlias::Type::Unserialize(Serializable *obj, Serialize::Data &d data["last_realname"] >> na->last_realname; data["last_usermask"] >> na->last_usermask; data["last_realhost"] >> na->last_realhost; - data["time_registered"] >> na->time_registered; + data["time_registered"] >> na->registered; data["last_seen"] >> na->last_seen; Anope::string vhost_ident, vhost_host, vhost_creator; @@ -233,8 +233,8 @@ Serializable *NickAlias::Type::Unserialize(Serializable *obj, Serialize::Data &d if (b) na->Extend<bool>("NS_NO_EXPIRE"); - if (na->time_registered < na->nc->time_registered) - na->nc->time_registered = na->time_registered; + if (na->registered < na->nc->registered) + na->nc->registered = na->registered; /* end compat */ return na; diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 7ca338aff..b1b43d533 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -80,7 +80,7 @@ void NickCore::Type::Serialize(const Serializable *obj, Serialize::Data &data) c data.Store("email", nc->email); data.Store("language", nc->language); data.Store("lastmail", nc->lastmail); - data.Store("time_registered", nc->time_registered); + data.Store("time_registered", nc->registered); data.Store("memomax", nc->memos.memomax); std::ostringstream oss; @@ -110,7 +110,7 @@ Serializable *NickCore::Type::Unserialize(Serializable *obj, Serialize::Data &da data["email"] >> nc->email; data["language"] >> nc->language; data["lastmail"] >> nc->lastmail; - data["time_registered"] >> nc->time_registered; + data["time_registered"] >> nc->registered; data["memomax"] >> nc->memos.memomax; { Anope::string buf; @@ -259,7 +259,7 @@ uint64_t NickCore::GetId() uint64_t attempt = 0; while (!this->id) { - const auto newidstr = this->display + "\0" + Anope::ToString(this->time_registered) + "\0" + Anope::ToString(attempt++); + const auto newidstr = this->display + "\0" + Anope::ToString(this->registered) + "\0" + Anope::ToString(attempt++); const auto newid = Anope::hash_cs()(newidstr); if (NickCoreIdList->emplace(newid, this).second) { diff --git a/src/regchannel.cpp b/src/regchannel.cpp index f45803e06..d88fe5ceb 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -109,7 +109,7 @@ ChannelInfo::ChannelInfo(const Anope::string &chname) , access(CHANACCESS_TYPE) , akick(AUTOKICK_TYPE) , name(chname) - , time_registered(Anope::CurTime) + , registered(Anope::CurTime) , last_used(Anope::CurTime) { if (chname.empty()) @@ -196,7 +196,7 @@ void ChannelInfo::Type::Serialize(const Serializable *obj, Serialize::Data &data if (ci->successor) data.Store("successorid", ci->successor->GetId()); data.Store("description", ci->desc); - data.Store("time_registered", ci->time_registered); + data.Store("registered", ci->registered); data.Store("last_used", ci->last_used); data.Store("last_topic", ci->last_topic); data.Store("last_topic_setter", ci->last_topic_setter); @@ -244,7 +244,7 @@ Serializable *ChannelInfo::Type::Unserialize(Serializable *obj, Serialize::Data ci->SetSuccessor(ssuccessorid ? NickCore::FindId(ssuccessorid) : NickCore::Find(ssuccessor)); data["description"] >> ci->desc; - data["time_registered"] >> ci->time_registered; + data["registered"] >> ci->registered; data["last_used"] >> ci->last_used; data["last_topic"] >> ci->last_topic; data["last_topic_setter"] >> ci->last_topic_setter; |