From 5a02c7379405fdc6609af7809708e3739ad4dbd8 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 7 Mar 2010 13:12:41 +0000 Subject: [PATCH] saslauth: Error out "better" on invalid module arguments git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1809 726aef4b-f618-498e-8847-2d620e286838 --- modules/extra/saslauth.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/extra/saslauth.cpp b/modules/extra/saslauth.cpp index 1c39e874..3676fd23 100644 --- a/modules/extra/saslauth.cpp +++ b/modules/extra/saslauth.cpp @@ -37,12 +37,18 @@ public: } else { CUtils::PrintError("Ignoring invalid SASL pwcheck method: " + *it); + sMessage = "Ignored invalid SASL pwcheck method"; } } method.TrimRight(); - if (sasl_server_init(NULL, NULL) != SASL_OK){ - CUtils::PrintError("SASL Could Not Be Initialized - Halting Startup"); + if (method.empty()) { + sMessage = "Need a pwcheck method as argument (saslauthd, auxprop)"; + return false; + } + + if (sasl_server_init(NULL, NULL) != SASL_OK) { + sMessage = "SASL Could Not Be Initialized - Halting Startup"; return false; }