mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-27 10:03:06 +01:00
add option for maximum hexdump length
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
"maxlauncherhr": true,
|
"maxlauncherhr": true,
|
||||||
"LogInboundMessages": false,
|
"LogInboundMessages": false,
|
||||||
"LogOutboundMessages": false,
|
"LogOutboundMessages": false,
|
||||||
|
"MaxHexdumpLength": 256,
|
||||||
"Event": 0,
|
"Event": 0,
|
||||||
"DivaEvent": 0,
|
"DivaEvent": 0,
|
||||||
"FestaEvent": 0,
|
"FestaEvent": 0,
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ type DevModeOptions struct {
|
|||||||
FixedStageID bool // Causes all move_stage to use the ID sl1Ns200p0a0u0 to get you into all stages
|
FixedStageID bool // Causes all move_stage to use the ID sl1Ns200p0a0u0 to get you into all stages
|
||||||
LogInboundMessages bool // Log all messages sent to the server
|
LogInboundMessages bool // Log all messages sent to the server
|
||||||
LogOutboundMessages bool // Log all messages sent to the clients
|
LogOutboundMessages bool // Log all messages sent to the clients
|
||||||
|
MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled
|
||||||
DivaEvent int // Diva Defense event status
|
DivaEvent int // Diva Defense event status
|
||||||
FestaEvent int // Hunter's Festa event status
|
FestaEvent int // Hunter's Festa event status
|
||||||
TournamentEvent int // VS Tournament event status
|
TournamentEvent int // VS Tournament event status
|
||||||
|
|||||||
@@ -239,5 +239,9 @@ func (s *Session) logMessage(opcode uint16, data []byte, sender string, recipien
|
|||||||
}
|
}
|
||||||
fmt.Printf("[%s] -> [%s]\n", sender, recipient)
|
fmt.Printf("[%s] -> [%s]\n", sender, recipient)
|
||||||
fmt.Printf("Opcode: %s\n", opcodePID)
|
fmt.Printf("Opcode: %s\n", opcodePID)
|
||||||
fmt.Printf("Data [%d bytes]:\n%s\n", len(data), hex.Dump(data))
|
if len(data) <= s.server.erupeConfig.DevModeOptions.MaxHexdumpLength {
|
||||||
|
fmt.Printf("Data [%d bytes]:\n%s\n", len(data), hex.Dump(data))
|
||||||
|
} else {
|
||||||
|
fmt.Printf("Data [%d bytes]:\n(Too long!)\n\n", len(data))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user