Permalink
Browse files

Fix error message for invalid network name

  • Loading branch information...
DarthGandalf committed Oct 20, 2013
1 parent 11efcee commit c74344f783455fa81148dbe57b2d79fd6a06a46e
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/User.cpp
View
@@ -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;
}

0 comments on commit c74344f

Please sign in to comment.