mirror of
https://github.com/anope/anope.git
synced 2026-06-28 07:56:37 +02:00
Remove time from the name of some variables where its obvious.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{END IF}
|
||||
<tr>
|
||||
<td>Time registered</td>
|
||||
<td>{TIME_REGISTERED}</td>
|
||||
<td>{REGISTERED}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last used</td>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{END IF}
|
||||
<tr>
|
||||
<td>Time registered:</td>
|
||||
<td>{TIME_REGISTERED}</td>
|
||||
<td>{REGISTERED}</td>
|
||||
</tr>
|
||||
{IF EXISTS VHOST}
|
||||
<tr>
|
||||
|
||||
+6
-6
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -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;
|
||||
|
||||
+4
-4
@@ -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;
|
||||
|
||||
+3
-3
@@ -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)
|
||||
{
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user