summaryrefslogtreecommitdiff
path: root/src
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 /src
parente957c7b2d27d8abb89143ee43675a72a3017226e (diff)
added protocol support for incoming NOTICEs
Diffstat (limited to 'src')
-rw-r--r--src/messages.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index 1fcc8b898..a0c5e6dfb 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -244,6 +244,22 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params)
IRCD->SendNumeric(422, source.GetSource(), ":- MOTD file not found! Please contact your IRC administrator.");
}
+void Notice::Run(MessageSource &source, const std::vector<Anope::string> &params)
+{
+ Anope::string message = params[1];
+
+ User *u = source.GetUser();
+
+ /* ignore channel notices */
+ if (!IRCD->IsChannelValid(params[0]))
+ {
+ BotInfo *bi = BotInfo::Find(params[0]);
+ if (!bi)
+ return;
+ FOREACH_MOD(OnBotNotice, (u, bi, message));
+ }
+}
+
void Part::Run(MessageSource &source, const std::vector<Anope::string> &params)
{
User *u = source.GetUser();