This commit is contained in:
shoopea
2021-11-10 13:41:37 +08:00
parent 4772cd7f71
commit e185eff578
3 changed files with 39 additions and 14 deletions

10
ttd.go
View File

@@ -735,3 +735,13 @@ func (s *ServerTTD) Initialize() {
s.UpdateCompanies()
s.UpdateClients()
}
func (s *ServerTTD) SetPasswd(id uint8, passwd string) {
px := PacketAdminRCon{
Packet: Packet{PType: AdminPacketAdminRCon},
Command: fmt.Sprintf("company_pw %d %s", id, passwd),
}
err := s.Send(px.Bytes())
logErrorDebug(err, "Server.SetPasswd() : Send(AdminPacketAdminRCon)")
return
}