MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / killConnection

Method killConnection

server/player/conn.go:111–118  ·  view source on GitHub ↗

killConnection kills the player's connection

(serverError bool, reason string)

Source from the content-addressed store, hash-verified

109
110// killConnection kills the player's connection
111func (p *Player) killConnection(serverError bool, reason string) {
112 var logFunction = log.Infolnf
113 if serverError {
114 // if an error happened on the server's side, the log message will be an error
115 logFunction = log.Errorlnf
116 }
117 logFunction("%sPlayer %s disconnected: %s", log.FormatAddr(true /*TODO replace*/, p.RemoteAddr()), p.Username(), reason)
118}

Callers 2

listenPacketsMethod · 0.95
writeOrKillMethod · 0.95

Calls 2

FormatAddrFunction · 0.92
UsernameMethod · 0.80

Tested by

no test coverage detected