From 881fa94add5f4026bb5dcba4d45a855f32d39434 Mon Sep 17 00:00:00 2001 From: Jos Ahrens Date: Sat, 5 Nov 2016 17:58:36 +0000 Subject: [PATCH] sasl: Make the first requirement for SET actually mandatory, return information about settings if no input for SET --- modules/sasl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/sasl.cpp b/modules/sasl.cpp index 941e9f66..c2ded309 100644 --- a/modules/sasl.cpp +++ b/modules/sasl.cpp @@ -101,6 +101,15 @@ class CSASLMod : public CModule { } void Set(const CString& sLine) { + if (sLine.Token(1).empty()) { + CString sUsername = GetNV("username"); + CString sPassword = GetNV("password"); + + PutModule("Username is currently " + (sUsername.empty() ? "not set" : "set to '" + sUsername + "'") + + ", a password was " + (sPassword.empty() ? "not " : "") + "supplied."); + return; + } + SetNV("username", sLine.Token(1)); SetNV("password", sLine.Token(2));