mirror of https://github.com/SeanOMik/znc-push.git
Merge pull request #85 from FruitieX/fruitiex/url_improvements
URL service improvements:
This commit is contained in:
commit
4fc6d45458
11
README.md
11
README.md
|
@ -237,12 +237,18 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
|
||||||
|
|
||||||
This option must be set when using Boxcar or Pushover.
|
This option must be set when using Boxcar or Pushover.
|
||||||
|
|
||||||
|
When using the custom URL service, if this option is set it will enable HTTP basic
|
||||||
|
authentication and be used as username.
|
||||||
|
|
||||||
* `secret = ""`
|
* `secret = ""`
|
||||||
|
|
||||||
Authentication token for push notifications.
|
Authentication token for push notifications.
|
||||||
|
|
||||||
This option must be set when using Notify My Android, Pushover, Prowl, Supertoasty or PushBullet.
|
This option must be set when using Notify My Android, Pushover, Prowl, Supertoasty or PushBullet.
|
||||||
|
|
||||||
|
When using the custom URL service, if this option is set it will enable HTTP basic
|
||||||
|
authentication and be used as password.
|
||||||
|
|
||||||
* `target = ""`
|
* `target = ""`
|
||||||
|
|
||||||
Device or target name for push notifications.
|
Device or target name for push notifications.
|
||||||
|
@ -281,6 +287,11 @@ to something similar to "http://domain/#channel/2011-03-09 14:25:09", or
|
||||||
local scheme to access a mobile application. Keyword expansion is performed on this
|
local scheme to access a mobile application. Keyword expansion is performed on this
|
||||||
value.
|
value.
|
||||||
|
|
||||||
|
* `message_uri_post = "no"`
|
||||||
|
|
||||||
|
When using the custom URL service, this option allows you to specify whether to use the
|
||||||
|
POST method instead of GET.
|
||||||
|
|
||||||
* `message_uri_title` = ""`
|
* `message_uri_title` = ""`
|
||||||
|
|
||||||
If you're using Pushover.net, you can specify a title for the `message_uri` option.
|
If you're using Pushover.net, you can specify a title for the `message_uri` option.
|
||||||
|
|
12
push.cpp
12
push.cpp
|
@ -132,6 +132,7 @@ class CPushMod : public CModule
|
||||||
defaults["message_length"] = "100";
|
defaults["message_length"] = "100";
|
||||||
defaults["message_title"] = "{title}";
|
defaults["message_title"] = "{title}";
|
||||||
defaults["message_uri"] = "";
|
defaults["message_uri"] = "";
|
||||||
|
defaults["message_uri_post"] = "no";
|
||||||
defaults["message_uri_title"] = "";
|
defaults["message_uri_title"] = "";
|
||||||
defaults["message_priority"] = "0";
|
defaults["message_priority"] = "0";
|
||||||
defaults["message_sound"] = "";
|
defaults["message_sound"] = "";
|
||||||
|
@ -472,7 +473,10 @@ class CPushMod : public CModule
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
use_post = false;
|
if(options["message_uri_post"] != "yes")
|
||||||
|
{
|
||||||
|
use_post = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (parts[0] == "https")
|
if (parts[0] == "https")
|
||||||
{
|
{
|
||||||
|
@ -490,6 +494,12 @@ class CPushMod : public CModule
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTP basic auth
|
||||||
|
if(options["username"] != "" || options["secret"] != "")
|
||||||
|
{
|
||||||
|
service_auth = options["username"] + CString(":") + options["secret"];
|
||||||
|
}
|
||||||
|
|
||||||
// Process the remaining portion of the URL
|
// Process the remaining portion of the URL
|
||||||
url = parts[1];
|
url = parts[1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue