mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user