Check for username/secret when sending messages

This commit is contained in:
John Reese 2011-09-29 15:44:58 -04:00
parent 4667fd52bc
commit d76bc28067
1 changed files with 7 additions and 0 deletions

View File

@ -288,8 +288,15 @@ class CPushMod : public CModule
CString service_auth; CString service_auth;
MCString params; MCString params;
// Service-specific profiles
if (service == "notifo") if (service == "notifo")
{ {
if (options["username"] == "" || options["secret"] == "")
{
PutModule("Error: username or secret not set");
return;
}
service_host = "api.notifo.com"; service_host = "api.notifo.com";
service_url = "/v1/send_notification"; service_url = "/v1/send_notification";