summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/messages.h7
-rw-r--r--include/protocol.h2
-rw-r--r--modules/protocol/inspircd.cpp6
-rw-r--r--src/messages.cpp12
4 files changed, 26 insertions, 1 deletions
diff --git a/include/messages.h b/include/messages.h
index 510f66361..58b90cc28 100644
--- a/include/messages.h
+++ b/include/messages.h
@@ -45,6 +45,13 @@ namespace Message
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
+ struct CoreExport Ignore final
+ : IRCDMessage
+ {
+ Ignore(Module *creator, const Anope::string &mname);
+ void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
+ };
+
struct CoreExport Invite
: IRCDMessage
{
diff --git a/include/protocol.h b/include/protocol.h
index 08a41d3da..5c71c2960 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -362,7 +362,7 @@ public:
FLAG_MAX,
};
-private:
+protected:
/** The name of the message (e.g. PRIVMSG). */
const Anope::string name;
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index e65f3098c..790a7bf9c 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -2537,6 +2537,10 @@ class ProtoInspIRCd final
Message::Stats message_stats;
Message::Time message_time;
+ /* Ignored message handlers. */
+ Message::Ignore message_burst;
+ Message::Ignore message_sinfo;
+
/* Our message handlers */
IRCDMessageAway message_away;
IRCDMessageCapab message_capab;
@@ -2587,6 +2591,8 @@ public:
, message_squery(this, "SQUERY")
, message_stats(this)
, message_time(this)
+ , message_burst(this, "BURST")
+ , message_sinfo(this, "SINFO")
, message_away(this)
, message_capab(this)
, message_chghost(this)
diff --git a/src/messages.cpp b/src/messages.cpp
index 273ab827b..b1c3c074d 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -57,6 +57,18 @@ void Error::Run(MessageSource &source, const std::vector<Anope::string> &params,
Anope::Quitting = true;
}
+Ignore::Ignore(Module *creator, const Anope::string &mname)
+ : IRCDMessage(creator, mname, 0)
+{
+ SetFlag(FLAG_SOFT_LIMIT);
+}
+
+void Ignore::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
+{
+ Log(LOG_DEBUG_3) << "Intentionally ignoring " << name << " message";
+}
+
+
void Invite::Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags)
{
User *targ = User::Find(params[0]);