Skip to content

Commit 310b595

Browse files
committed
Small commit to hopefully permanently fix fmtcheck changes
Certain files - config.network.go, mapper.go, rooms.go and userrecords.go always error out when doing the fmtcheck during the make process. This hopefully fixes this permanently by comitting the change always enforced by fmtcheck.
1 parent f2395ca commit 310b595

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

internal/configs/config.network.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ type Network struct {
88
LocalPort ConfigInt `yaml:"LocalPort"` // Port used for admin connections, localhost only
99
HttpPort ConfigInt `yaml:"HttpPort"` // Port used for web requests
1010
HttpsPort ConfigInt `yaml:"HttpsPort"` // Port used for web https requests
11-
HttpsRedirect ConfigBool `yaml:"HttpsRedirect"` // If true, http traffic will be redirected to https
12-
AfkSeconds ConfigInt `yaml:"AfkSeconds"` // How long until a player is marked as afk?
13-
MaxIdleSeconds ConfigInt `yaml:"MaxIdleSeconds"` // How many seconds a player can go without a command in game before being kicked.
14-
TimeoutMods ConfigBool `yaml:"TimeoutMods"` // Whether to kick admin/mods when idle too long.
15-
ZombieSeconds ConfigInt `yaml:"ZombieSeconds"` // How many seconds a player will be a zombie allowing them to reconnect.
16-
LogoutRounds ConfigInt `yaml:"LogoutRounds"` // How many rounds of uninterrupted meditation must be completed to log out.
11+
HttpsRedirect ConfigBool `yaml:"HttpsRedirect"` // If true, http traffic will be redirected to https
12+
AfkSeconds ConfigInt `yaml:"AfkSeconds"` // How long until a player is marked as afk?
13+
MaxIdleSeconds ConfigInt `yaml:"MaxIdleSeconds"` // How many seconds a player can go without a command in game before being kicked.
14+
TimeoutMods ConfigBool `yaml:"TimeoutMods"` // Whether to kick admin/mods when idle too long.
15+
ZombieSeconds ConfigInt `yaml:"ZombieSeconds"` // How many seconds a player will be a zombie allowing them to reconnect.
16+
LogoutRounds ConfigInt `yaml:"LogoutRounds"` // How many rounds of uninterrupted meditation must be completed to log out.
1717
}
1818

1919
func (n *Network) Validate() {

internal/mapper/mapper.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,15 +998,15 @@ func PreCacheMaps() {
998998
func validateRoomBiomes() {
999999
missingBiomeCount := 0
10001000
invalidBiomeCount := 0
1001-
1001+
10021002
for _, roomId := range rooms.GetAllRoomIds() {
10031003
room := rooms.LoadRoom(roomId)
10041004
if room == nil {
10051005
continue
10061006
}
1007-
1007+
10081008
originalBiome := room.Biome
1009-
1009+
10101010
// Check if room has no biome
10111011
if originalBiome == "" {
10121012
zoneBiome := rooms.GetZoneBiome(room.Zone)
@@ -1022,7 +1022,7 @@ func validateRoomBiomes() {
10221022
}
10231023
}
10241024
}
1025-
1025+
10261026
if missingBiomeCount > 0 || invalidBiomeCount > 0 {
10271027
mudlog.Info("Biome validation complete", "missing", missingBiomeCount, "invalid", invalidBiomeCount)
10281028
}

internal/rooms/rooms.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,6 @@ func (r *Room) Validate() error {
21982198
}
21992199
}
22002200

2201-
22022201
// Make sure all items are validated (and have uids)
22032202
for i := range r.Items {
22042203
r.Items[i].Validate()

internal/users/userrecord.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ func (u *UserRecord) GetOnlineInfo() OnlineInfo {
628628
// Check if connected through a secure telnet local port (where TLS proxy forwards)
629629
port := connections.GetConnectionPort(u.connectionId)
630630
networkConfig := configs.GetNetworkConfig()
631-
631+
632632
for _, securePortStr := range networkConfig.SecureTelnetLocalPort {
633633
securePort, _ := strconv.Atoi(securePortStr)
634634
if securePort > 0 && port == securePort {

0 commit comments

Comments
 (0)