indexing changes and add world description

This commit is contained in:
wish
2022-09-04 16:40:06 +10:00
parent 3c096fa8d7
commit e0176ca774
2 changed files with 10 additions and 10 deletions

View File

@@ -174,9 +174,7 @@ func main() {
ci := 0
count := 1
for _, ee := range erupeConfig.Entrance.Entries {
cn := 1
for _, ce := range ee.Channels {
for i, ce := range ee.Channels {
sid := (4096 + si*256) + (16 + ci)
c := *channelserver.NewServer(&channelserver.Config{
ID: uint16(sid),
@@ -195,13 +193,12 @@ func main() {
if err != nil {
preventClose(fmt.Sprintf("Failed to start channel server: %s", err.Error()))
} else {
channelQuery += fmt.Sprintf("INSERT INTO servers (server_id, season, current_players, world_name, land) VALUES (%d, %d, 0, '%s', %d);", sid, si%3, ee.Name, cn)
channelQuery += fmt.Sprintf(`INSERT INTO servers (server_id, season, current_players, world_name, world_description, land) VALUES (%d, %d, 0, '%s', '%s', %d);`, sid, si%3, ee.Name, ee.Description, i+1)
channels = append(channels, &c)
logger.Info(fmt.Sprintf("Started channel server %d on port %d", count, ce.Port))
ci++
count++
}
cn++
}
ci = 0
si++