mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
27 lines
603 B
Go
27 lines
603 B
Go
|
package server
|
||
|
|
||
|
type StatsData struct {
|
||
|
ClientConnectsTotal int64
|
||
|
ClientDisconnectsTotal int64
|
||
|
FirstNotHelloDisconnects int64
|
||
|
|
||
|
DisconnectCodes map[int]int64
|
||
|
DisconnectReasons map[string]int64
|
||
|
|
||
|
CommandsIssuedTotal int64
|
||
|
CommandsIssuedMap map[Command]int64
|
||
|
|
||
|
MessagesSent int64
|
||
|
}
|
||
|
|
||
|
func newStatsData() *StatsData {
|
||
|
return &StatsData{
|
||
|
CommandsIssuedMap: make(map[Command]int64),
|
||
|
DisconnectCodes: make(map[int]int64),
|
||
|
DisconnectReasons: make(map[string]int64),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Statistics is several variables that get incremented during normal operation of the server.
|
||
|
var Statistics = newStatsData()
|