diff options
author | Sadie Powell <sadie@witchery.services> | 2020-09-11 21:24:43 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-09-28 15:28:27 +0100 |
commit | 9d6dd4af11a3b6e3660b124f413176f2eb451e88 (patch) | |
tree | a5aefc79bf54228d1d1d10285251a04c27bf8e7c | |
parent | f430522b410e43b60eac78c66fecb37400fbac18 (diff) |
Remove the non-tagged version of IRCDMessage::Run.
-rw-r--r-- | include/messages.h | 40 | ||||
-rw-r--r-- | include/protocol.h | 3 | ||||
-rw-r--r-- | modules/protocol/bahamut.cpp | 12 | ||||
-rw-r--r-- | modules/protocol/charybdis.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/hybrid.cpp | 30 | ||||
-rw-r--r-- | modules/protocol/inspircd3.cpp | 52 | ||||
-rw-r--r-- | modules/protocol/ngircd.cpp | 24 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 16 | ||||
-rw-r--r-- | modules/protocol/unreal4.cpp | 42 | ||||
-rw-r--r-- | src/messages.cpp | 40 | ||||
-rw-r--r-- | src/protocol.cpp | 7 |
12 files changed, 137 insertions, 145 deletions
diff --git a/include/messages.h b/include/messages.h index 4df1e09c0..1efa73362 100644 --- a/include/messages.h +++ b/include/messages.h @@ -23,35 +23,35 @@ namespace Message { Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Capab : IRCDMessage { Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Error : IRCDMessage { Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Invite : IRCDMessage { Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Join : IRCDMessage { Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; typedef std::pair<ChannelStatus, User *> SJoinUser; @@ -69,105 +69,105 @@ namespace Message { Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Kill : IRCDMessage { Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Mode : IRCDMessage { Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport MOTD : IRCDMessage { MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Notice : IRCDMessage { Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Part : IRCDMessage { Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Ping : IRCDMessage { Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Privmsg : IRCDMessage { Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Quit : IRCDMessage { Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport SQuit : IRCDMessage { SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Stats : IRCDMessage { Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Time : IRCDMessage { Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Topic : IRCDMessage { Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Version : IRCDMessage { Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; struct CoreExport Whois : IRCDMessage { Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override; }; } // namespace Message diff --git a/include/protocol.h b/include/protocol.h index 51168ece0..39f94b1bd 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -271,8 +271,7 @@ class CoreExport IRCDMessage : public Service public: IRCDMessage(Module *owner, const Anope::string &n, unsigned p = 0); unsigned GetParamCount() const; - virtual void Run(MessageSource &, const std::vector<Anope::string> ¶ms) = 0; - virtual void Run(MessageSource &, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags); + virtual void Run(MessageSource &, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) = 0; void SetFlag(IRCDMessageFlag f) { flags.insert(f); } bool HasFlag(IRCDMessageFlag f) const { return flags.count(f); } diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 0eb9fdd77..cc2bc4039 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -297,7 +297,7 @@ struct IRCDMessageBurst : IRCDMessage { IRCDMessageBurst(Module *creator) : IRCDMessage(creator, "BURST", 0) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* If we found a server with the given source, that one just * finished bursting. If there was no source, then our uplink @@ -315,7 +315,7 @@ struct IRCDMessageMode : IRCDMessage { IRCDMessageMode(Module *creator, const Anope::string &sname) : IRCDMessage(creator, sname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() > 2 && IRCD->IsChannelValid(params[0])) { @@ -366,7 +366,7 @@ struct IRCDMessageNick : IRCDMessage { IRCDMessageNick(Module *creator) : IRCDMessage(creator, "NICK", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() == 10) { @@ -399,7 +399,7 @@ struct IRCDMessageServer : IRCDMessage { IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { unsigned int hops = Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; new Server(source.GetServer() == NULL ? Me : source.GetServer(), params[0], hops, params[2]); @@ -410,7 +410,7 @@ struct IRCDMessageSJoin : IRCDMessage { IRCDMessageSJoin(Module *creator) : IRCDMessage(creator, "SJOIN", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string modes; if (params.size() >= 4) @@ -466,7 +466,7 @@ struct IRCDMessageTopic : IRCDMessage { IRCDMessageTopic(Module *creator) : IRCDMessage(creator, "TOPIC", 4) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Channel *c = Channel::Find(params[0]); if (c) diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 81d4b14ef..c8c2baba4 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -172,7 +172,7 @@ struct IRCDMessageEncap : IRCDMessage SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // In a burst, states that the source user is logged in as the account. if (params[1] == "LOGIN" || params[1] == "SU") @@ -238,7 +238,7 @@ struct IRCDMessageEUID : IRCDMessage * user is not logged in with services). Hence a NICK or UID command received * from a remote server should not be sent in EUID form to other servers. */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { NickAlias *na = NULL; if (params[9] != "*") @@ -254,7 +254,7 @@ struct IRCDMessageServer : IRCDMessage IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } // SERVER dev.anope.de 1 :charybdis test server - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // Servers other then our immediate uplink are introduced via SID if (params[1] != "1") @@ -269,7 +269,7 @@ struct IRCDMessagePass : IRCDMessage { IRCDMessagePass(Module *creator) : IRCDMessage(creator, "PASS", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // UplinkSID is used in IRCDMessageServer UplinkSID = params[3]; diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 0081125d3..45887de6e 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -330,7 +330,7 @@ struct IRCDMessageBMask : IRCDMessage /* 0 1 2 3 */ /* :0MC BMASK 1350157102 #channel b :*!*@*.test.com */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Channel *c = Channel::Find(params[1]); ChannelMode *mode = ModeManager::FindChannelModeByChar(params[2][0]); @@ -350,7 +350,7 @@ struct IRCDMessageEOB : IRCDMessage { IRCDMessageEOB(Module *craetor) : IRCDMessage(craetor, "EOB", 0) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetServer()->Sync(true); } @@ -360,7 +360,7 @@ struct IRCDMessageJoin : Message::Join { IRCDMessageJoin(Module *creator) : Message::Join(creator, "JOIN") { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() < 2) return; @@ -368,7 +368,7 @@ struct IRCDMessageJoin : Message::Join std::vector<Anope::string> p = params; p.erase(p.begin()); - return Message::Join::Run(source, p); + return Message::Join::Run(source, p, tags); } }; @@ -378,7 +378,7 @@ struct IRCDMessageNick : IRCDMessage /* 0 1 */ /* :0MCAAAAAB NICK newnick 1350157102 */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetUser()->ChangeNick(params[0], convertTo<time_t>(params[1])); } @@ -390,7 +390,7 @@ struct IRCDMessagePass : IRCDMessage /* 0 1 2 3 */ /* PASS password TS 6 0MC */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { UplinkSID = params[3]; } @@ -400,7 +400,7 @@ struct IRCDMessagePong : IRCDMessage { IRCDMessagePong(Module *creator) : IRCDMessage(creator, "PONG", 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetServer()->Sync(false); } @@ -412,7 +412,7 @@ struct IRCDMessageServer : IRCDMessage /* 0 1 2 */ /* SERVER hades.arpa 1 :ircd-hybrid test server */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* Servers other than our immediate uplink are introduced via SID */ if (params[1] != "1") @@ -430,7 +430,7 @@ struct IRCDMessageSID : IRCDMessage /* 0 1 2 3 */ /* :0MC SID hades.arpa 2 4XY :ircd-hybrid test server */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { unsigned int hops = params[1].is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; new Server(source.GetServer() == NULL ? Me : source.GetServer(), params[0], hops, params[3], params[2]); @@ -443,7 +443,7 @@ struct IRCDMessageSJoin : IRCDMessage { IRCDMessageSJoin(Module *creator) : IRCDMessage(creator, "SJOIN", 2) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string modes; @@ -495,7 +495,7 @@ struct IRCDMessageSVSMode : IRCDMessage * parv[2] = mode * parv[3] = optional argument (services id) */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = User::Find(params[0]); @@ -513,7 +513,7 @@ struct IRCDMessageTBurst : IRCDMessage { IRCDMessageTBurst(Module *creator) : IRCDMessage(creator, "TBURST", 5) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string setter; sepstream(params[3], '!').GetToken(setter, 0); @@ -529,7 +529,7 @@ struct IRCDMessageTMode : IRCDMessage { IRCDMessageTMode(Module *creator) : IRCDMessage(creator, "TMODE", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { time_t ts = 0; @@ -554,7 +554,7 @@ struct IRCDMessageUID : IRCDMessage { IRCDMessageUID(Module *creator) : IRCDMessage(creator, "UID", 10) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { NickAlias *na = NULL; @@ -592,7 +592,7 @@ struct IRCDMessageCertFP: IRCDMessage /* 0 */ /* :0MCAAAAAB CERTFP 4C62287BA6776A89CD4F8FF10A62FFB35E79319F51AF6C62C674984974FCCB1D */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = source.GetUser(); diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index de9406258..71d45f9a8 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -766,13 +766,13 @@ struct IRCDMessageAway : Message::Away { IRCDMessageAway(Module *creator) : Message::Away(creator, "AWAY") { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { std::vector<Anope::string> newparams(params); if (newparams.size() > 1) newparams.erase(newparams.begin()); - Message::Away::Run(source, newparams); + Message::Away::Run(source, newparams, tags); } }; @@ -844,7 +844,7 @@ struct IRCDMessageCapab : Message::Capab IRCDMessageCapab(Module *creator) : Message::Capab(creator, "CAPAB") { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params[0].equals_cs("START")) { @@ -1169,7 +1169,7 @@ struct IRCDMessageCapab : Message::Capab Log() << "CHGIDENT missing, Usage disabled until module is loaded."; } - Message::Capab::Run(source, params); + Message::Capab::Run(source, params, tags); } }; @@ -1177,7 +1177,7 @@ struct IRCDMessageEncap : IRCDMessage { IRCDMessageEncap(Module *creator) : IRCDMessage(creator, "ENCAP", 4) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (!Anope::Match(Me->GetSID(), params[0]) && !Anope::Match(Me->GetName(), params[0])) return; @@ -1227,7 +1227,7 @@ struct IRCDMessageFHost : IRCDMessage { IRCDMessageFHost(Module *creator) : IRCDMessage(creator, "FHOST", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = source.GetUser(); if (u->HasMode("CLOAK")) @@ -1240,7 +1240,7 @@ struct IRCDMessageFIdent : IRCDMessage { IRCDMessageFIdent(Module *creator) : IRCDMessage(creator, "FIDENT", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetUser()->SetIdent(params[0]); } @@ -1250,7 +1250,7 @@ struct IRCDMessageKick : IRCDMessage { IRCDMessageKick(Module *creator) : IRCDMessage(creator, "KICK", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // Received: :715AAAAAA KICK #chan 715AAAAAD :reason // Received: :715AAAAAA KICK #chan 628AAAAAA 4 :reason @@ -1269,7 +1269,7 @@ struct IRCDMessageSave : IRCDMessage IRCDMessageSave(Module *creator) : IRCDMessage(creator, "SAVE", 2), last_collide(0) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *targ = User::Find(params[0]); time_t ts; @@ -1313,7 +1313,7 @@ class IRCDMessageMetadata : IRCDMessage public: IRCDMessageMetadata(Module *creator, const bool &handle_topiclock, const bool &handle_mlock) : IRCDMessage(creator, "METADATA", 3), do_topiclock(handle_topiclock), do_mlock(handle_mlock) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // We deliberately ignore non-bursting servers to avoid pseudoserver fights // Channel METADATA has an additional parameter: the channel TS @@ -1433,7 +1433,7 @@ struct IRCDMessageEndburst : IRCDMessage { IRCDMessageEndburst(Module *creator) : IRCDMessage(creator, "ENDBURST", 0) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Server *s = source.GetServer(); @@ -1447,7 +1447,7 @@ struct IRCDMessageFJoin : IRCDMessage { IRCDMessageFJoin(Module *creator) : IRCDMessage(creator, "FJOIN", 2) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string modes; if (params.size() >= 3) @@ -1503,7 +1503,7 @@ struct IRCDMessageFMode : IRCDMessage { IRCDMessageFMode(Module *creator) : IRCDMessage(creator, "FMODE", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* :source FMODE #test 12345678 +nto foo */ @@ -1532,7 +1532,7 @@ struct IRCDMessageFTopic : IRCDMessage { IRCDMessageFTopic(Module *creator) : IRCDMessage(creator, "FTOPIC", 4) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // :source FTOPIC channel ts topicts :topic // :source FTOPIC channel ts topicts setby :topic (burst or RESYNC) @@ -1550,7 +1550,7 @@ struct IRCDMessageIdle : IRCDMessage { IRCDMessageIdle(Module *creator) : IRCDMessage(creator, "IDLE", 1) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { BotInfo *bi = BotInfo::Find(params[0]); if (bi) @@ -1568,7 +1568,7 @@ struct IRCDMessageIJoin : IRCDMessage { IRCDMessageIJoin(Module *creator) : IRCDMessage(creator, "IJOIN", 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // :<uid> IJOIN <chan> <membid> [<ts> [<flags>]] Channel *c = Channel::Find(params[0]); @@ -1604,7 +1604,7 @@ struct IRCDMessageMode : IRCDMessage { IRCDMessageMode(Module *creator) : IRCDMessage(creator, "MODE", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (IRCD->IsChannelValid(params[0])) { @@ -1634,7 +1634,7 @@ struct IRCDMessageNick : IRCDMessage { IRCDMessageNick(Module *creator) : IRCDMessage(creator, "NICK", 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetUser()->ChangeNick(params[0]); } @@ -1644,7 +1644,7 @@ struct IRCDMessageOperType : IRCDMessage { IRCDMessageOperType(Module *creator) : IRCDMessage(creator, "OPERTYPE", 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* opertype is equivalent to mode +o because servers don't do this directly */ @@ -1658,7 +1658,7 @@ struct IRCDMessagePing : IRCDMessage { IRCDMessagePing(Module *creator) : IRCDMessage(creator, "PING", 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params[0] == Me->GetSID()) IRCD->SendPong(params[0], source.GetServer()->GetSID()); @@ -1669,7 +1669,7 @@ struct IRCDMessageRSQuit : IRCDMessage { IRCDMessageRSQuit(Module *creator) : IRCDMessage(creator, "RSQUIT", 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Server *s = Server::Find(params[0]); const Anope::string &reason = params.size() > 1 ? params[1] : ""; @@ -1685,7 +1685,7 @@ struct IRCDMessageServer : IRCDMessage { IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (!source.GetServer() && params.size() == 5) { @@ -1718,7 +1718,7 @@ struct IRCDMessageSQuit : Message::SQuit { IRCDMessageSQuit(Module *creator) : Message::SQuit(creator) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params[0] == rsquit_id || params[0] == rsquit_server) { @@ -1732,7 +1732,7 @@ struct IRCDMessageSQuit : Message::SQuit IRCD->SendServer(s); } else - Message::SQuit::Run(source, params); + Message::SQuit::Run(source, params, tags); } }; @@ -1740,7 +1740,7 @@ struct IRCDMessageTime : IRCDMessage { IRCDMessageTime(Module *creator) : IRCDMessage(creator, "TIME", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { UplinkSocket::Message(Me) << "TIME " << source.GetSource() << " " << params[1] << " " << Anope::CurTime; } @@ -1763,7 +1763,7 @@ struct IRCDMessageUID : IRCDMessage * 8+: modes and params -- IMPORTANT, some modes (e.g. +s) may have parameters. So don't assume a fixed position of realname! * last: realname */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { time_t ts = convertTo<time_t>(params[1]); diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index f35904c5a..5bf683c7c 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -153,7 +153,7 @@ struct IRCDMessage005 : IRCDMessage IRCDMessage005(Module *creator) : IRCDMessage(creator, "005", 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } // Please see <http://www.irc.org/tech_docs/005.html> for details. - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { size_t pos; Anope::string parameter, data; @@ -194,7 +194,7 @@ struct IRCDMessage376 : IRCDMessage * */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { } }; @@ -220,7 +220,7 @@ struct IRCDMessageChaninfo : IRCDMessage * a channel has no user limit (the parameter <modes> doesn't list the "l" * channel mode). In this case <limit> should be "0". */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { bool created; Channel *c = Channel::FindOrCreate(params[0], created); @@ -262,7 +262,7 @@ struct IRCDMessageJoin : Message::Join * * if a user joins a new channel, the ircd sends <channelname>\7<umode> */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *user = source.GetUser(); size_t pos = params[0].find('\7'); @@ -281,7 +281,7 @@ struct IRCDMessageJoin : Message::Join std::vector<Anope::string> new_params; new_params.push_back(channel); - Message::Join::Run(source, new_params); + Message::Join::Run(source, new_params, tags); if (!modes.empty()) { @@ -312,7 +312,7 @@ struct IRCDMessageMetadata : IRCDMessage * - "user": the user name (ident) of a client (can't be empty) */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = User::Find(params[0]); if (!u) @@ -363,7 +363,7 @@ struct IRCDMessageMode : IRCDMessage * params[n] = parameters */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string modes = params[1]; @@ -410,7 +410,7 @@ struct IRCDMessageNick : IRCDMessage * params[0] = newnick * */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() == 1) { @@ -454,7 +454,7 @@ struct IRCDMessageNJoin : IRCDMessage * * Received: :dev.anope.de NJOIN #test :DukeP2,@DukeP,%test,+test2 */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { std::list<Message::Join::SJoinUser> users; @@ -494,7 +494,7 @@ struct IRCDMessagePong : IRCDMessage * when receiving a new server and then finish sync once we * get a pong back from that server. */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (!source.GetServer()->IsSynced()) source.GetServer()->Sync(false); @@ -530,7 +530,7 @@ struct IRCDMessageServer : IRCDMessage * params[3] = server description */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() == 3) { @@ -557,7 +557,7 @@ struct IRCDMessageTopic : IRCDMessage IRCDMessageTopic(Module *creator) : IRCDMessage(creator, "TOPIC", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } // Received: :DukeP TOPIC #anope :test - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Channel *c = Channel::Find(params[0]); if (!c) diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index b40d45e6f..f7db95e6b 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -191,7 +191,7 @@ struct IRCDMessageEncap : IRCDMessage { IRCDMessageEncap(Module *creator) : IRCDMessage(creator, "ENCAP", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* * Received: :dev.anope.de ENCAP * SU DukePyrolator DukePyrolator @@ -247,7 +247,7 @@ struct IRCDMessagePass : IRCDMessage { IRCDMessagePass(Module *creator) : IRCDMessage(creator, "PASS", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { UplinkSID = params[3]; } @@ -259,7 +259,7 @@ struct IRCDMessageServer : IRCDMessage /* 0 1 2 */ /* SERVER hades.arpa 1 :ircd-hybrid test server */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* Servers other than our immediate uplink are introduced via SID */ if (params[1] != "1") @@ -287,7 +287,7 @@ struct IRCDMessageUID : IRCDMessage params[10] = info */ // :42X UID Adam 1 1348535644 +aow Adam 192.168.0.5 192.168.0.5 42XAAAAAB 0 192.168.0.5 :Adam - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* An IP of 0 means the user is spoofed */ Anope::string ip = params[6]; diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 692a11c1b..6c4b58358 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -148,7 +148,7 @@ struct IRCDMessageEncap : IRCDMessage IRCDMessageEncap(Module *creator) : IRCDMessage(creator, "ENCAP", 3) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } // Debug: Received: :00BAAAAAB ENCAP * LOGIN Adam - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params[1] == "LOGIN" || params[1] == "SU") { @@ -172,10 +172,10 @@ struct IRCDMessageJoin : Message::Join { IRCDMessageJoin(Module *creator) : Message::Join(creator, "JOIN") { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() == 1 && params[0] == "0") - return Message::Join::Run(source, params); + return Message::Join::Run(source, params, tags); if (params.size() < 2) return; @@ -183,7 +183,7 @@ struct IRCDMessageJoin : Message::Join std::vector<Anope::string> p = params; p.erase(p.begin()); - return Message::Join::Run(source, p); + return Message::Join::Run(source, p, tags); } }; @@ -191,7 +191,7 @@ struct IRCDMessagePass : IRCDMessage { IRCDMessagePass(Module *creator) : IRCDMessage(creator, "PASS", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { UplinkSID = params[3]; } @@ -202,7 +202,7 @@ struct IRCDMessageServer : IRCDMessage IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } // SERVER hades.arpa 1 :ircd-ratbox test server - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { // Servers other then our immediate uplink are introduced via SID if (params[1] != "1") @@ -222,7 +222,7 @@ struct IRCDMessageTBurst : IRCDMessage * params[2] = topic OR who set the topic * params[3] = topic if params[2] isn't the topic */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { time_t topic_time = Anope::string(params[1]).is_pos_number_only() ? convertTo<time_t>(params[1]) : Anope::CurTime; Channel *c = Channel::Find(params[0]); @@ -242,7 +242,7 @@ struct IRCDMessageUID : IRCDMessage IRCDMessageUID(Module *creator) : IRCDMessage(creator, "UID", 9) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } // :42X UID Adam 1 1348535644 +aow Adam 192.168.0.5 192.168.0.5 42XAAAAAB :Adam - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { /* Source is always the server */ User::OnIntroduce(params[0], params[4], params[5], "", params[6], source.GetServer(), params[8], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, params[3], params[7], NULL); diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index 318ca5417..3f30abffa 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -640,7 +640,7 @@ struct IRCDMessageCapab : Message::Capab { IRCDMessageCapab(Module *creator) : Message::Capab(creator, "PROTOCTL") { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { for (unsigned i = 0; i < params.size(); ++i) { @@ -801,7 +801,7 @@ struct IRCDMessageCapab : Message::Capab } } - Message::Capab::Run(source, params); + Message::Capab::Run(source, params, tags); } }; @@ -809,7 +809,7 @@ struct IRCDMessageChgHost : IRCDMessage { IRCDMessageChgHost(Module *creator) : IRCDMessage(creator, "CHGHOST", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = User::Find(params[0]); if (u) @@ -821,7 +821,7 @@ struct IRCDMessageChgIdent : IRCDMessage { IRCDMessageChgIdent(Module *creator) : IRCDMessage(creator, "CHGIDENT", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = User::Find(params[0]); if (u) @@ -833,7 +833,7 @@ struct IRCDMessageChgName : IRCDMessage { IRCDMessageChgName(Module *creator) : IRCDMessage(creator, "CHGNAME", 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = User::Find(params[0]); if (u) @@ -845,7 +845,7 @@ struct IRCDMessageMD : IRCDMessage { IRCDMessageMD(Module *creator) : IRCDMessage(creator, "MD", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { const Anope::string &mdtype = params[0], &obj = params[1], @@ -873,7 +873,7 @@ struct IRCDMessageMode : IRCDMessage { IRCDMessageMode(Module *creator, const Anope::string &mname) : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { bool server_source = source.GetServer() != NULL; Anope::string modes = params[1]; @@ -918,7 +918,7 @@ struct IRCDMessageNetInfo : IRCDMessage { IRCDMessageNetInfo(Module *creator) : IRCDMessage(creator, "NETINFO", 8) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { UplinkSocket::Message() << "NETINFO " << MaxUserCount << " " << Anope::CurTime << " " << convertTo<int>(params[2]) << " " << params[3] << " 0 0 0 :" << params[7]; } @@ -948,7 +948,7 @@ struct IRCDMessageNick : IRCDMessage ** parv[0] = new nickname ** parv[1] = hopcount */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (params.size() == 11) { @@ -1014,7 +1014,7 @@ struct IRCDMessagePong : IRCDMessage { IRCDMessagePong(Module *creator) : IRCDMessage(creator, "PONG", 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (!source.GetServer()->IsSynced()) source.GetServer()->Sync(false); @@ -1025,7 +1025,7 @@ struct IRCDMessageSASL : IRCDMessage { IRCDMessageSASL(Module *creator) : IRCDMessage(creator, "SASL", 4) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { if (!SASL::sasl) return; @@ -1045,7 +1045,7 @@ struct IRCDMessageSDesc : IRCDMessage { IRCDMessageSDesc(Module *creator) : IRCDMessage(creator, "SDESC", 1) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetServer()->SetDescription(params[0]); } @@ -1055,7 +1055,7 @@ struct IRCDMessageSetHost : IRCDMessage { IRCDMessageSetHost(Module *creator) : IRCDMessage(creator, "SETHOST", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = source.GetUser(); @@ -1071,7 +1071,7 @@ struct IRCDMessageSetIdent : IRCDMessage { IRCDMessageSetIdent(Module *creator) : IRCDMessage(creator, "SETIDENT", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = source.GetUser(); u->SetVIdent(params[0]); @@ -1082,7 +1082,7 @@ struct IRCDMessageSetName : IRCDMessage { IRCDMessageSetName(Module *creator) : IRCDMessage(creator, "SETNAME", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { User *u = source.GetUser(); u->SetRealname(params[0]); @@ -1093,7 +1093,7 @@ struct IRCDMessageServer : IRCDMessage { IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { unsigned int hops = Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; @@ -1115,7 +1115,7 @@ struct IRCDMessageSID : IRCDMessage { IRCDMessageSID(Module *creator) : IRCDMessage(creator, "SID", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { unsigned int hops = Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0; @@ -1129,7 +1129,7 @@ struct IRCDMessageSJoin : IRCDMessage { IRCDMessageSJoin(Module *creator) : IRCDMessage(creator, "SJOIN", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string modes; if (params.size() >= 4) @@ -1223,7 +1223,7 @@ struct IRCDMessageTopic : IRCDMessage ** parv[2] = topic time ** parv[3] = topic text */ - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Channel *c = Channel::Find(params[0]); if (c) @@ -1249,7 +1249,7 @@ struct IRCDMessageUID : IRCDMessage { IRCDMessageUID(Module *creator) : IRCDMessage(creator, "UID", 12) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { Anope::string nickname = params[0], @@ -1318,7 +1318,7 @@ struct IRCDMessageUmode2 : IRCDMessage { IRCDMessageUmode2(Module *creator) : IRCDMessage(creator, "UMODE2", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) anope_override { source.GetUser()->SetModesInternal(source, "%s", params[0].c_str()); } diff --git a/src/messages.cpp b/src/messages.cpp index 9ad3b5d51..393d25a59 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -22,7 +22,7 @@ using namespace Message; -void Away::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Away::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { const Anope::string &msg = !params.empty() ? params[0] : ""; @@ -33,7 +33,7 @@ void Away::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) Log(source.GetUser(), "away") << "is no longer away"; } -void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { if (params.size() == 1) { @@ -47,14 +47,14 @@ void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) Servers::Capab.insert(params[i]); } -void Error::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Error::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Log(LOG_TERMINAL) << "ERROR: " << params[0]; Anope::QuitReason = "Received ERROR from uplink: " + params[0]; Anope::Quitting = true; } -void Invite::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Invite::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *targ = User::Find(params[0]); Channel *c = Channel::Find(params[1]); @@ -65,7 +65,7 @@ void Invite::Run(MessageSource &source, const std::vector<Anope::string> ¶ms FOREACH_MOD(OnInvite, (source.GetUser(), c, targ)); } -void Join::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Join::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *user = source.GetUser(); const Anope::string &channels = params[0]; @@ -167,7 +167,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co } } -void Kick::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Kick::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { const Anope::string &channel = params[0]; const Anope::string &users = params[1]; @@ -184,7 +184,7 @@ void Kick::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) c->KickInternal(source, user, reason); } -void Kill::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Kill::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *u = User::Find(params[0]); BotInfo *bi; @@ -211,7 +211,7 @@ void Kill::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) u->KillInternal(source, params[1]); } -void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Anope::string buf; for (unsigned i = 1; i < params.size(); ++i) @@ -234,7 +234,7 @@ void Message::Mode::Run(MessageSource &source, const std::vector<Anope::string> } /* XXX We should cache the file somewhere not open/read/close it on every request */ -void MOTD::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void MOTD::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Server *s = Server::Find(params[0]); if (s != Me) @@ -257,7 +257,7 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) IRCD->SendNumeric(422, source.GetSource(), ":- MOTD file not found! Please contact your IRC administrator."); } -void Notice::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Notice::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Anope::string message = params[1]; @@ -273,7 +273,7 @@ void Notice::Run(MessageSource &source, const std::vector<Anope::string> ¶ms } } -void Part::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Part::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *u = source.GetUser(); const Anope::string &reason = params.size() > 1 ? params[1] : ""; @@ -295,12 +295,12 @@ void Part::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) } } -void Ping::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Ping::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { IRCD->SendPong(params.size() > 1 ? params[1] : Me->GetSID(), params[0]); } -void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { const Anope::string &receiver = params[0]; Anope::string message = params[1]; @@ -373,7 +373,7 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶m return; } -void Quit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Quit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { const Anope::string &reason = params[0]; User *user = source.GetUser(); @@ -383,7 +383,7 @@ void Quit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) user->Quit(reason); } -void SQuit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void SQuit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Server *s = Server::Find(params[0]); @@ -404,7 +404,7 @@ void SQuit::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) s->Delete(s->GetName() + " " + s->GetUplink()->GetName()); } -void Stats::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Stats::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *u = source.GetUser(); @@ -455,7 +455,7 @@ void Stats::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) return; } -void Time::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Time::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { time_t t; time(&t); @@ -466,7 +466,7 @@ void Time::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) return; } -void Topic::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Topic::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Channel *c = Channel::Find(params[0]); if (c) @@ -475,13 +475,13 @@ void Topic::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) return; } -void Version::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Version::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { Module *enc = ModuleManager::FindFirstOf(ENCRYPTION); IRCD->SendNumeric(351, source.GetSource(), "Anope-%s %s :%s -(%s) -- %s", Anope::Version().c_str(), Me->GetName().c_str(), IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "(none)", Anope::VersionBuildString().c_str()); } -void Whois::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) +void Whois::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) { User *u = User::Find(params[0]); diff --git a/src/protocol.cpp b/src/protocol.cpp index d3306c265..8ca38d894 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -502,10 +502,3 @@ unsigned IRCDMessage::GetParamCount() const { return this->param_count; } - -void IRCDMessage::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) -{ - // Most IRCds don't support message tags yet so use the tagless variant. - Run(source, params); -} - |