diff options
author | Adam <Adam@anope.org> | 2015-01-10 15:23:24 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-01-10 15:24:48 -0500 |
commit | 1f02278a1c307975548499fe2a6d6d79f8397d0c (patch) | |
tree | 8b13a1bfe0895ef4473a117fc4a05af60cff5267 /src/messages.cpp | |
parent | 32007f81cf0bb475f3621d7637666b06ffa482b9 (diff) |
Log user away messages
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/messages.cpp b/src/messages.cpp index 7036acfc7..a771b2f1f 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -25,7 +25,13 @@ using namespace Message; void Away::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) { - FOREACH_MOD(OnUserAway, (source.GetUser(), params.empty() ? "" : params[0])); + const Anope::string &msg = !params.empty() ? params[0] : ""; + + FOREACH_MOD(OnUserAway, (source.GetUser(), msg)); + if (!msg.empty()) + Log(source.GetUser(), "away") << "is now away: " << msg; + else + Log(source.GetUser(), "away") << "is no longer away"; } void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) |