Make networks a bit less confusing.

If user is connected without network, try "default" network first, if it
exists. If not, try "user" network. If it doesn't exist too, just use
the first one.

Also configs converted from old configs have "default" network instead
of "user" one.
This commit is contained in:
Alexey Sokolov
2012-01-27 22:51:09 +07:00
parent e0f4fad2ff
commit fa287ef791
2 changed files with 9 additions and 5 deletions

View File

@@ -331,9 +331,9 @@ bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
}
if (pConfig->FindStringVector("server", vsList, false) || pConfig->FindStringVector("chan", vsList, false) || pConfig->FindSubConfig("chan", subConf, false)) {
CIRCNetwork *pNetwork = FindNetwork("user");
CIRCNetwork *pNetwork = FindNetwork("default");
if (!pNetwork) {
pNetwork = AddNetwork("user");
pNetwork = AddNetwork("default");
}
if (pNetwork) {