From e9fc5a9589b403b1a1018b8c3f6c28aaca6fc2ae Mon Sep 17 00:00:00 2001 From: Mathieu Poussin Date: Tue, 14 Jul 2015 03:25:52 -0400 Subject: [PATCH 1/3] Add pushalot support --- push.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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"); From 254cd9bd1c9b063108c8e70ac2f7d1badec122fd Mon Sep 17 00:00:00 2001 From: Mathieu Poussin Date: Tue, 14 Jul 2015 03:26:34 -0400 Subject: [PATCH 2/3] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 191480d..3fe51bf 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 From c92172c7eb212ef48106127560a0a641e945e19d Mon Sep 17 00:00:00 2001 From: Mathieu Poussin Date: Tue, 14 Jul 2015 03:28:24 -0400 Subject: [PATCH 3/3] Fix Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3fe51bf..d45b561 100755 --- a/README.md +++ b/README.md @@ -518,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