mirror of
https://github.com/anope/anope.git
synced 2026-07-04 03:23:13 +02:00
Remove time from the name of some variables where its obvious.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user