use default season integer on fail

This commit is contained in:
wish
2022-10-12 05:15:40 +11:00
parent 1f95033e28
commit f9e9aaa303

View File

@@ -25,7 +25,7 @@ func encodeServerInfo(config *config.Config, s *Server) []byte {
sid := (4096 + serverIdx*256) + 16
err := s.db.QueryRow("SELECT season FROM servers WHERE server_id=$1", sid).Scan(&season)
if err != nil {
panic(err)
season = 0
}
if si.IP == "" {
si.IP = config.Host