1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 08:13:13 +02:00

Store the source message identifier in CommandSource.

This commit is contained in:
Sadie Powell
2024-02-22 13:19:36 +00:00
parent 7423fa9998
commit f93d9e7698
4 changed files with 23 additions and 6 deletions
+6 -1
View File
@@ -228,7 +228,12 @@ void BotInfo::OnMessage(User *u, const Anope::string &message, const Anope::map<
if (this->commands.empty())
return;
CommandSource source(u->nick, u, u->Account(), u, this);
Anope::string msgid;
auto iter = tags.find("msgid");
if (iter != tags.end())
msgid = iter->second;
CommandSource source(u->nick, u, u->Account(), u, this, msgid);
Command::Run(source, message);
}
+7 -2
View File
@@ -17,8 +17,13 @@
#include "regchannel.h"
#include "channels.h"
CommandSource::CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *r, BotInfo *bi) : nick(n), u(user), nc(core), reply(r),
c(NULL), service(bi)
CommandSource::CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *r, BotInfo *bi, const Anope::string &m)
: nick(n)
, u(user)
, nc(core)
, reply(r)
, service(bi)
, msgid(m)
{
}