1
0
Fork 0
forked from External/ergo
KLINE'd clients would produce a QUIT snotice without a corresponding
CONNECT snotice; explicitly suppress the QUIT snotice.
This commit is contained in:
Shivaram Lingamneni 2022-05-03 12:46:12 -04:00
parent dea2e7961a
commit 077081076c
3 changed files with 14 additions and 2 deletions

View file

@ -373,7 +373,9 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
if !session.IP().IsLoopback() || session.isTor {
isBanned, info := server.klines.CheckMasks(c.AllNickmasks()...)
if isBanned {
c.setKlined()
c.Quit(info.BanMessage(c.t("You are banned from this server (%s)")), nil)
server.logger.Info("connect", "Client rejected by k-line", c.NickMaskString())
return true
}
}