code: func (s *server) handleBanPeerMsg(state *peerState, sp *serverPeer) {
  	host, _, err := net.SplitHostPort(sp.Addr())
  	if err != nil {
  		srvrLog.Debugf("can't split ban peer %s %v", sp.Addr(), err)
  		return
  	}
  	direction := directionString(sp.Inbound())
  	srvrLog.Infof("Banned peer %s (%s) for %v", host, direction,
  		cfg.BanDuration)
  	state.banned[host] = time.Now().Add(cfg.BanDuration)
  }
docs: // handleBanPeerMsg deals with banning peers.  It is invoked from the
  // peerHandler goroutine.