sasl: Make the first requirement for SET actually mandatory, return information about settings if no input for SET

This commit is contained in:
Jos Ahrens
2016-11-05 17:58:36 +00:00
committed by Alexey Sokolov
parent c55caba68b
commit 881fa94add
+9
View File
@@ -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));