Remove unused event and comments on block
This commit is contained in:
parent
890c517efd
commit
2364293742
@ -165,13 +165,8 @@ func (s *Server) HandleClientConnection(w http.ResponseWriter, r *http.Request)
|
|||||||
// Check if this client's IP address is banned. If so send a rejection.
|
// Check if this client's IP address is banned. If so send a rejection.
|
||||||
if blocked, err := data.IsIPAddressBanned(ipAddress); blocked {
|
if blocked, err := data.IsIPAddressBanned(ipAddress); blocked {
|
||||||
log.Debugln("Client ip address has been blocked. Rejecting.")
|
log.Debugln("Client ip address has been blocked. Rejecting.")
|
||||||
event := events.UserDisabledEvent{}
|
|
||||||
event.SetDefaults()
|
|
||||||
|
|
||||||
w.WriteHeader(http.StatusForbidden)
|
w.WriteHeader(http.StatusForbidden)
|
||||||
// Send this disabled event specifically to this single connected client
|
|
||||||
// to let them know they've been banned.
|
|
||||||
// _server.Send(event.GetBroadcastPayload(), client)
|
|
||||||
return
|
return
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
log.Errorln("error determining if IP address is blocked: ", err)
|
log.Errorln("error determining if IP address is blocked: ", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user