update passwd auto

This commit is contained in:
shoopea 2021-11-10 15:04:27 +08:00
parent 0d5c94e06f
commit caba808d8b
2 changed files with 15 additions and 5 deletions

12
ttd.go
View File

@ -558,7 +558,17 @@ func (s *ServerTTD) UpdateCompanies() {
logErrorDebug(err, "Server.UpdateClients() : Send(PacketAdminPoll) : AdminPacketAdminRCon")
break
} else if !co.Protected {
s.SetPasswd(co.CompanyExtlID, "blabla")
for _, cc := range cfg.Clients {
if cc.CompanyID == co.CompanyID {
s.SetPasswd(co.CompanyExtlID, cc.Passwd)
co.Protected = true
break
}
}
if !co.Protected {
s.SetPasswd(co.CompanyExtlID, "blabla")
}
}
}
s.Status.UpdateCompanies = time.Now()

View File

@ -1,6 +1,6 @@
// Code generated by version.sh (@generated) DO NOT EDIT.
package main
var githash = "f84f361"
var buildstamp = "2021-11-10_06:55:15"
var commits = "186"
var version = "f84f361-b186 - 2021-11-10_06:55:15"
var githash = "0d5c94e"
var buildstamp = "2021-11-10_07:04:16"
var commits = "187"
var version = "0d5c94e-b187 - 2021-11-10_07:04:16"