summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2013-07-08 05:05:13 +0200
committerDukePyrolator <DukePyrolator@anope.org>2013-07-08 05:05:13 +0200
commit2ea594d6779cb2456f91c2cbe24e5242286836b5 (patch)
tree581f532aa692aef2109e5321f8716fe78a30eb00 /include
parente957c7b2d27d8abb89143ee43675a72a3017226e (diff)
added protocol support for incoming NOTICEs
Diffstat (limited to 'include')
-rw-r--r--include/messages.h13
-rw-r--r--include/modules.h7
2 files changed, 17 insertions, 3 deletions
diff --git a/include/messages.h b/include/messages.h
index d226a35b7..059dd718a 100644
--- a/include/messages.h
+++ b/include/messages.h
@@ -9,14 +9,14 @@
* Based on the original code of Services by Andy Church.
*
*/
-
+
#include "protocol.h"
-
+
/* Common IRCD messages.
* Protocol modules may chose to include some, none, or all of these handlers
* as they see fit.
*/
-
+
namespace Message
{
@@ -94,6 +94,13 @@ namespace Message
void Run(MessageSource &source, const std::vector<Anope::string> &params) 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> &params) 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); }
diff --git a/include/modules.h b/include/modules.h
index 8948d3389..c725152eb 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -973,6 +973,13 @@ class CoreExport Module : public Extensible
*/
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message) { throw NotImplementedException(); }
+ /** Called when we receive a NOTICE for one of our clients
+ * @param u The user sending the NOTICE
+ * @param bi The target of the NOTICE
+ * @param message The message
+ */
+ virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) { throw NotImplementedException(); }
+
/** Called when we receive a PRIVMSG for a registered channel we are in
* @param u The source of the message
* @param c The channel