diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2013-07-08 05:05:13 +0200 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2013-07-08 05:05:13 +0200 |
commit | 2ea594d6779cb2456f91c2cbe24e5242286836b5 (patch) | |
tree | 581f532aa692aef2109e5321f8716fe78a30eb00 /src | |
parent | e957c7b2d27d8abb89143ee43675a72a3017226e (diff) |
added protocol support for incoming NOTICEs
Diffstat (limited to 'src')
-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(); |