mirror of
https://github.com/znc/znc.git
synced 2026-08-04 16:03:25 +02:00
sasl: Make the first requirement for SET actually mandatory, return information about settings if no input for SET
This commit is contained in:
committed by
Alexey Sokolov
parent
c55caba68b
commit
881fa94add
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user