From d3637c48575afa31ad186092b2a2bdbff31e9c1c Mon Sep 17 00:00:00 2001 From: dgw Date: Sat, 1 Apr 2017 02:19:24 -0400 Subject: [PATCH] Tweak {message} to remove unexpected extra text Resolves #226 --- push.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/push.cpp b/push.cpp index f7a6c9a..5d9573d 100755 --- a/push.cpp +++ b/push.cpp @@ -132,7 +132,7 @@ class CPushMod : public CModule defaults["target"] = ""; // Notification settings - defaults["message_content"] = "{message}"; + defaults["message_content"] = "{context}: [{nick}] {message}"; defaults["message_length"] = "100"; defaults["message_title"] = "{title}"; defaults["message_uri"] = ""; @@ -1204,11 +1204,8 @@ class CPushMod : public CModule if (notify_channel(nick, channel, message)) { CString title = "Highlight"; - CString msg = channel.GetName(); - msg += ": [" + nick.GetNick(); - msg += "] " + message; - send_message(msg, title, channel.GetName(), nick); + send_message(message, title, channel.GetName(), nick); } return CONTINUE; @@ -1226,11 +1223,8 @@ class CPushMod : public CModule if (notify_channel(nick, channel, message)) { CString title = "Highlight"; - CString msg = channel.GetName(); - msg += ": " + nick.GetNick(); - msg += " " + message; - send_message(msg, title, channel.GetName(), nick); + send_message(message, title, channel.GetName(), nick); } return CONTINUE; @@ -1247,10 +1241,8 @@ class CPushMod : public CModule if (notify_pm(nick, message)) { CString title = "Private Message"; - CString msg = "From " + nick.GetNick(); - msg += ": " + message; - send_message(msg, title, nick.GetNick(), nick); + send_message(message, title, nick.GetNick(), nick); } return CONTINUE; @@ -1267,10 +1259,8 @@ class CPushMod : public CModule if (notify_pm(nick, message)) { CString title = "Private Message"; - CString msg = "* " + nick.GetNick(); - msg += " " + message; - send_message(msg, title, nick.GetNick(), nick); + send_message(message, title, nick.GetNick(), nick); } return CONTINUE;