diff --git a/README.md b/README.md index 191480d..d45b561 100755 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ conditions. ZNC Push current supports the following services: * [Airgram][] * [Faast][] * [Nexmo][] +* [Pushalot][] * Custom URL GET requests This project is still a Work In Progress, but should be functional enough and stable enough @@ -517,6 +518,7 @@ from me and not from my employer. See the `LICENSE` file for details. [Airgram]: http://airgramapp.com/ [Faast]: http://faast.io/ [Nexmo]: https://www.nexmo.com +[Pushalot]: https://pushalot.com/ [faq]: https://github.com/jreese/znc-push/blob/master/doc/faq.md [examples]: https://github.com/jreese/znc-push/blob/master/doc/examples.md diff --git a/push.cpp b/push.cpp index a6ba360..a80e127 100755 --- a/push.cpp +++ b/push.cpp @@ -406,6 +406,33 @@ class CPushMod : public CModule params["priority"] = options["message_priority"]; } } + + else if (service == "pushalot") + { + if (options["secret"] == "") + { + PutModule("Error: secret (authorization token) not set"); + return; + } + + service_host = "pushalot.com"; + service_url = "/api/sendmessage"; + + params["AuthorizationToken"] = options["secret"]; + params["Title"] = message_title; + params["Body"] = message_content; + + if (message_uri != "") + { + params["Link"] = message_uri; + } + + if ( options["message_uri_title"] != "" ) + { + params["LinkTitle"] = options["message_uri_title"]; + } + } + else if (service == "prowl") { if (options["secret"] == "") @@ -1294,6 +1321,11 @@ class CPushMod : public CModule { PutModule("Note: Pushover requires setting both the 'username' (to user key) and the 'secret' (to application api key) option"); } + else if (value == "pushalot") + { + PutModule("Note: Pushalot requires setting the 'secret' (to user key) (to authorization token) option"); + } + else if (value == "prowl") { PutModule("Note: Prowl requires setting the 'secret' option");