Merge pull request #227 from dgw/issue-226

Tweak {message} to remove unexpected extra text
This commit is contained in:
John Reese 2017-04-03 16:35:31 -07:00 committed by GitHub
commit dcb1939b85
1 changed files with 5 additions and 15 deletions

View File

@ -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;