1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 05:26:38 +02:00

Add a protocol module function for extracting timestamps.

This commit is contained in:
Sadie Powell
2024-03-12 00:14:13 +00:00
parent 1538909ac0
commit 04e1a4f5c8
9 changed files with 44 additions and 31 deletions
+2 -2
View File
@@ -228,7 +228,7 @@ struct IRCDMessageTBurst final
*/
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
auto topic_time = Anope::Convert<time_t>(params[1], Anope::CurTime);
auto topic_time = IRCD->ExtractTimestamp(params[1]);
Channel *c = Channel::Find(params[0]);
if (!c)
@@ -250,7 +250,7 @@ struct IRCDMessageUID final
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
/* Source is always the server */
User::OnIntroduce(params[0], params[4], params[5], "", params[6], source.GetServer(), params[8], Anope::Convert<time_t>(params[2], 0), params[3], params[7], NULL);
User::OnIntroduce(params[0], params[4], params[5], "", params[6], source.GetServer(), params[8], IRCD->ExtractTimestamp(params[2]), params[3], params[7], NULL);
}
};