mirror of https://github.com/SeanOMik/znc-push.git
commit
326da4980b
|
@ -12,6 +12,7 @@ conditions. ZNC Push current supports the following services:
|
|||
* [Supertoasty][]
|
||||
* [PushBullet][]
|
||||
* [Airgram][]
|
||||
* [Faast][]
|
||||
* Custom URL GET requests
|
||||
|
||||
This project is still a Work In Progress, but should be functional enough and stable enough
|
||||
|
@ -417,6 +418,7 @@ This project is licensed under the MIT license. See the `LICENSE` file for deta
|
|||
[Supertoasty]: http://www.supertoasty.com
|
||||
[PushBullet]: https://www.pushbullet.com/
|
||||
[Airgram]: http://airgramapp.com/
|
||||
[Faast]: http://faast.io/
|
||||
|
||||
[issues]: http://github.com/jreese/znc-push/issues
|
||||
[ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer"
|
||||
|
|
33
push.cpp
33
push.cpp
|
@ -407,9 +407,35 @@ class CPushMod : public CModule
|
|||
|
||||
params["title"] = message_title;
|
||||
params["text"] = message_content;
|
||||
params["image"] = "https://github.com/jreese/znc-push/raw/supertoasty/logo.png";
|
||||
params["image"] = "https://raw2.github.com/jreese/znc-push/master/logo.png";
|
||||
params["sender"] = "ZNC Push";
|
||||
}
|
||||
else if (service == "faast")
|
||||
{
|
||||
if (options["secret"] == "")
|
||||
{
|
||||
PutModule("Error: secret not set to apikey");
|
||||
return;
|
||||
}
|
||||
|
||||
service_host = "www.appnotifications.com";
|
||||
service_url = "/account/notifications.json";
|
||||
|
||||
params["user_credentials"] = options["secret"];
|
||||
params["notification[title]"] = message_title;
|
||||
params["notification[subtitle]"] = context;
|
||||
params["notification[message]"] = message_content;
|
||||
params["notification[long_message]"] = message_content;
|
||||
params["notification[icon_url]"] = "https://raw2.github.com/jreese/znc-push/master/logo.png";
|
||||
if ( options["message_sound"] != "" )
|
||||
{
|
||||
params["notification[sound]"] = options["message_sound"];
|
||||
}
|
||||
if ( options["message_uri"] != "" )
|
||||
{
|
||||
params["notification[run_command]"] = options["message_uri"];
|
||||
}
|
||||
}
|
||||
else if (service == "url")
|
||||
{
|
||||
if (options["message_uri"] == "")
|
||||
|
@ -1121,6 +1147,11 @@ class CPushMod : public CModule
|
|||
{
|
||||
PutModule("Note: Airgram requires setting the 'target' with the email address of the recipient");
|
||||
}
|
||||
else if (value == "faast")
|
||||
{
|
||||
PutModule("Note: Faast requires setting the secret to your apikey");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
PutModule("Error: unknown service name");
|
||||
|
|
Loading…
Reference in New Issue