CZNC::AddUser(): Always set the error return on a useful value

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1406 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-03-01 16:43:58 +00:00
parent e302611bd3
commit ea569a2bdc

View File

@@ -1702,6 +1702,7 @@ bool CZNC::DeleteUser(const CString& sUsername) {
bool CZNC::AddUser(CUser* pUser, CString& sErrorRet) {
if (FindUser(pUser->GetUserName()) != NULL) {
sErrorRet = "User already exists";
DEBUG("User [" << pUser->GetUserName() << "] - already exists");
return false;
}