killConnection kills the player's connection
(serverError bool, reason string)
| 109 | |
| 110 | // killConnection kills the player's connection |
| 111 | func (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 | } |
no test coverage detected