diff options
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 16 |
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> ¶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) +{ + 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> ¶ms) { User *u = source.GetUser(); |