Fix error message for invalid network name

This commit is contained in:
Alexey Sokolov
2013-10-20 17:51:43 +04:00
parent 11efcee422
commit c74344f783
+4 -1
View File
@@ -461,7 +461,10 @@ bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
}
CIRCNetwork* CUser::AddNetwork(const CString &sNetwork, CString& sErrorRet) {
if (!CIRCNetwork::IsValidNetwork(sNetwork) || FindNetwork(sNetwork)) {
if (!CIRCNetwork::IsValidNetwork(sNetwork)) {
sErrorRet = "Invalid network name. It should be alphanumeric. Not to be confused with server name";
return NULL;
} else if (FindNetwork(sNetwork)) {
sErrorRet = "Network [" + sNetwork.Token(0) + "] already exists";
return NULL;
}