From d76bc28067de696a079491df6784711e2c999fec Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 29 Sep 2011 15:44:58 -0400 Subject: [PATCH] Check for username/secret when sending messages --- push.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/push.cpp b/push.cpp index 624d53a..1146173 100644 --- a/push.cpp +++ b/push.cpp @@ -288,8 +288,15 @@ class CPushMod : public CModule CString service_auth; 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";