summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example.conf2
-rw-r--r--src/messages.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/data/example.conf b/data/example.conf
index c1fc5c20d..0db803f62 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -713,7 +713,7 @@ log
* create, destroy, join, part, kick, leave, mode
*
* Valid user options are:
- * connect, disconnect, quit, nick, ident, host, mode, maxusers, oper
+ * connect, disconnect, quit, nick, ident, host, mode, maxusers, oper, away
*
* Rawio and debug are simple yes/no answers, there are no types for them.
*
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> &params)
{
- 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> &params)