mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
nickserv: Auto-save passwords when they are set and remove the 'show' command
Passwords should be secret, so don't display them to everyone who asks. The auto-save is there to make owine happy. ;) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1250 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -35,17 +35,10 @@ public:
|
||||
if (sCmdName == "set") {
|
||||
CString sPass = sCommand.Token(1, true);
|
||||
m_sPass = sPass;
|
||||
PutModule("Password set");
|
||||
} else if (sCmdName == "show") {
|
||||
if (m_sPass.empty())
|
||||
PutModule("No password set");
|
||||
else
|
||||
PutModule("Current password: " + m_sPass);
|
||||
} else if (sCmdName == "save") {
|
||||
SetNV("Password", m_sPass);
|
||||
PutModule("Saved!");
|
||||
PutModule("Password set");
|
||||
} else {
|
||||
PutModule("Commands: set <password>, show, save");
|
||||
PutModule("Commands: set <password>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user