diff --git a/README.md b/README.md index 68a43cc..bfaa067 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ conditions. ZNC Push current supports the following services: * [Notifo][] * [Notify My Android][] (NMA) * [Prowl][] +* [Supertoasty][] This project is still a Work In Progress, but should be functional enough and stable enough for everyday usage. Users are more than welcome to submit feature requests or patches for @@ -161,6 +162,7 @@ Configuration * "notifo" * "nma" * "prowl" + * "supertoasty" * `username = ""` @@ -172,7 +174,7 @@ Configuration Authentication token for push notifications. - This option must be set when using Notifo, Notify My Android, or Prowl. + This option must be set when using Notifo, Notify My Android, Prowl or Supertoasty. ### Conditions @@ -340,6 +342,7 @@ This project is licensed under the MIT license. See the `LICENSE` file for deta [Notifo]: http://notifo.com [Notify My Android]: http://www.notifymyandroid.com [Prowl]: http://www.prowlapp.com +[Supertoasty]: http://www.supertoasty.com [mantis]: http://leetcode.net/mantis [ZNC]: http://en.znc.in "ZNC, an advanced IRC bouncer" diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..0a916ff Binary files /dev/null and b/logo.png differ diff --git a/push.cpp b/push.cpp index 560e02d..6818b0c 100644 --- a/push.cpp +++ b/push.cpp @@ -300,6 +300,26 @@ class CPushMod : public CModule params["description"] = short_message; params["url"] = uri; } + else if (service == "supertoasty") + { + if (options["secret"] == "") + { + PutModule("Error: secret (device id) not set"); + return; + } + + use_post = false; + use_port = 80; + use_ssl = false; + + service_host = "api.supertoasty.com"; + service_url = "/notify/"+options["secret"]; + + params["title"] = title; + params["text"] = short_message; + params["image"] = "https://github.com/jreese/znc-push/raw/supertoasty/logo.png"; + params["sender"] = "ZNC Push"; + } else { PutModule("Error: service type not selected"); @@ -901,6 +921,10 @@ class CPushMod : public CModule { PutModule("Note: Prowl requires setting the 'secret' option"); } + else if (value == "supertoasty") + { + PutModule("Note: Supertoasty requires setting the 'secret' option with device id"); + } else { PutModule("Error: unknown service name");