mirror of https://github.com/SeanOMik/znc-push.git
Remove hardcoded pushover app key; use username/secert for user/token instead
This commit is contained in:
parent
8be77b27be
commit
be540b540c
|
@ -200,7 +200,7 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
|
||||||
|
|
||||||
User account that should receive push notifications.
|
User account that should receive push notifications.
|
||||||
|
|
||||||
This option must be set when using Boxcar or Notifo.
|
This option must be set when using Boxcar, Pushover or Notifo.
|
||||||
|
|
||||||
* `secret = ""`
|
* `secret = ""`
|
||||||
|
|
||||||
|
|
15
push.cpp
15
push.cpp
|
@ -309,19 +309,22 @@ class CPushMod : public CModule
|
||||||
}
|
}
|
||||||
else if (service == "pushover")
|
else if (service == "pushover")
|
||||||
{
|
{
|
||||||
if (options["secret"] == "")
|
if (options["username"] == "")
|
||||||
{
|
{
|
||||||
PutModule("Error: secret (user key) not set");
|
PutModule("Error: username (user key) not set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (options["secret"] == "")
|
||||||
|
{
|
||||||
|
PutModule("Error: secret (application token/key) not set");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString pushover_api_token = "h6RToHDU7gNnB3IMyUb94SuwKtBzOD";
|
|
||||||
|
|
||||||
service_host = "api.pushover.net";
|
service_host = "api.pushover.net";
|
||||||
service_url = "/1/messages.json";
|
service_url = "/1/messages.json";
|
||||||
|
|
||||||
params["token"] = pushover_api_token;
|
params["token"] = options["secret"];
|
||||||
params["user"] = options["secret"];
|
params["user"] = options["username"];
|
||||||
params["title"] = message_title;
|
params["title"] = message_title;
|
||||||
params["message"] = message_content;
|
params["message"] = message_content;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue