mirror of https://github.com/SeanOMik/znc-push.git
Merge pull request #227 from dgw/issue-226
Tweak {message} to remove unexpected extra text
This commit is contained in:
commit
dcb1939b85
20
push.cpp
20
push.cpp
|
@ -132,7 +132,7 @@ class CPushMod : public CModule
|
||||||
defaults["target"] = "";
|
defaults["target"] = "";
|
||||||
|
|
||||||
// Notification settings
|
// Notification settings
|
||||||
defaults["message_content"] = "{message}";
|
defaults["message_content"] = "{context}: [{nick}] {message}";
|
||||||
defaults["message_length"] = "100";
|
defaults["message_length"] = "100";
|
||||||
defaults["message_title"] = "{title}";
|
defaults["message_title"] = "{title}";
|
||||||
defaults["message_uri"] = "";
|
defaults["message_uri"] = "";
|
||||||
|
@ -1204,11 +1204,8 @@ class CPushMod : public CModule
|
||||||
if (notify_channel(nick, channel, message))
|
if (notify_channel(nick, channel, message))
|
||||||
{
|
{
|
||||||
CString title = "Highlight";
|
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;
|
return CONTINUE;
|
||||||
|
@ -1226,11 +1223,8 @@ class CPushMod : public CModule
|
||||||
if (notify_channel(nick, channel, message))
|
if (notify_channel(nick, channel, message))
|
||||||
{
|
{
|
||||||
CString title = "Highlight";
|
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;
|
return CONTINUE;
|
||||||
|
@ -1247,10 +1241,8 @@ class CPushMod : public CModule
|
||||||
if (notify_pm(nick, message))
|
if (notify_pm(nick, message))
|
||||||
{
|
{
|
||||||
CString title = "Private 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;
|
return CONTINUE;
|
||||||
|
@ -1267,10 +1259,8 @@ class CPushMod : public CModule
|
||||||
if (notify_pm(nick, message))
|
if (notify_pm(nick, message))
|
||||||
{
|
{
|
||||||
CString title = "Private 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;
|
return CONTINUE;
|
||||||
|
|
Loading…
Reference in New Issue