mirror of
https://github.com/SeanOMik/znc-push.git
synced 2024-12-17 21:09:40 +00:00
Fix #46: Remove notifo support (R.I.P.)
Notifo has finally died, so there's no reason to keep its code around any longer. It's probably also safe to remove the section from the readme about migrating from the old notifo module that has been gone for over a year now.
This commit is contained in:
parent
97791061a7
commit
5225d4327f
2 changed files with 6 additions and 46 deletions
21
README.md
21
README.md
|
@ -6,7 +6,6 @@ services for any private message or channel highlight that matches a configurabl
|
|||
conditions. ZNC Push current supports the following services:
|
||||
|
||||
* [Boxcar][]
|
||||
* [Notifo][]
|
||||
* [Notify My Android][] (NMA)
|
||||
* [Pushover][]
|
||||
* [Prowl][]
|
||||
|
@ -66,7 +65,7 @@ Then select the push service you want to use, and set your username and secret a
|
|||
The secret is not your password, and can be obtained by logging into the service's website
|
||||
and looking in your profile or settings:
|
||||
|
||||
/msg *push set service notifo
|
||||
/msg *push set service pushover
|
||||
/msg *push set username foo
|
||||
/msg *push set secret ...
|
||||
|
||||
|
@ -80,18 +79,6 @@ or someone says your name in a channel. If this is everything you wanted, congr
|
|||
you're done!
|
||||
|
||||
|
||||
Migrating From Notifo
|
||||
---------------------
|
||||
|
||||
Before uninstalling the old Notifo module, save your settings to a file. When you have the
|
||||
new Push module installed, you can then load those settings back in, rather than needing
|
||||
to set your configuration all over again:
|
||||
|
||||
/msg *notifo save /tmp/znc_notifo
|
||||
/msg *push load /tmp/znc_notifo
|
||||
/msg *push set service notifo
|
||||
|
||||
|
||||
Commands
|
||||
--------
|
||||
|
||||
|
@ -192,7 +179,6 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
|
|||
Possible values include:
|
||||
|
||||
* "boxcar"
|
||||
* "notifo"
|
||||
* "nma"
|
||||
* "pushover"
|
||||
* "prowl"
|
||||
|
@ -204,13 +190,13 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
|
|||
|
||||
User account that should receive push notifications.
|
||||
|
||||
This option must be set when using Boxcar, Pushover or Notifo.
|
||||
This option must be set when using Boxcar or Pushover.
|
||||
|
||||
* `secret = ""`
|
||||
|
||||
Authentication token for push notifications.
|
||||
|
||||
This option must be set when using Notifo, Notify My Android, Pushover, Prowl, Supertoasty or PushBullet.
|
||||
This option must be set when using Notify My Android, Pushover, Prowl, Supertoasty or PushBullet.
|
||||
|
||||
* `target = ""`
|
||||
|
||||
|
@ -395,7 +381,6 @@ This project is licensed under the MIT license. See the `LICENSE` file for deta
|
|||
|
||||
|
||||
[Boxcar]: http://boxcar.io
|
||||
[Notifo]: http://notifo.com
|
||||
[Notify My Android]: http://www.notifymyandroid.com
|
||||
[Pushover]: http://pushover.net
|
||||
[Prowl]: http://www.prowlapp.com
|
||||
|
|
31
push.cpp
31
push.cpp
|
@ -176,7 +176,7 @@ class CPushMod : public CModule
|
|||
}
|
||||
|
||||
/**
|
||||
* Send a message to the currently-configured Notifo account.
|
||||
* Send a message to the currently-configured push service.
|
||||
* Requires (and assumes) that the user has already configured their
|
||||
* username and API secret using the 'set' command.
|
||||
*
|
||||
|
@ -231,28 +231,7 @@ class CPushMod : public CModule
|
|||
MCString params;
|
||||
|
||||
// Service-specific profiles
|
||||
if (service == "notifo")
|
||||
{
|
||||
if (options["username"] == "" || options["secret"] == "")
|
||||
{
|
||||
PutModule("Error: username or secret not set");
|
||||
return;
|
||||
}
|
||||
|
||||
service_host = "api.notifo.com";
|
||||
service_url = "/v1/send_notification";
|
||||
|
||||
// BASIC auth, base64-encoded username:password
|
||||
service_auth = options["username"] + CString(":") + options["secret"];
|
||||
service_auth.Base64Encode();
|
||||
|
||||
params["to"] = options["username"];
|
||||
params["msg"] = message_content;
|
||||
params["label"] = app;
|
||||
params["title"] = message_title;
|
||||
params["uri"] = message_uri;
|
||||
}
|
||||
else if (service == "pushbullet")
|
||||
if (service == "pushbullet")
|
||||
{
|
||||
if (options["target"] == "" || options["secret"] == "")
|
||||
{
|
||||
|
@ -1059,11 +1038,7 @@ class CPushMod : public CModule
|
|||
{
|
||||
value.MakeLower();
|
||||
|
||||
if (value == "notifo")
|
||||
{
|
||||
PutModule("Note: Notifo requires setting both 'username' and 'secret' options");
|
||||
}
|
||||
else if (value == "pushbullet")
|
||||
if (value == "pushbullet")
|
||||
{
|
||||
PutModule("Note: Pushbullet requires setting both 'target' (to device id) and 'secret' (to api key) options");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue