forked from External/ergo
fix #688
This commit is contained in:
parent
62473468f0
commit
3480f124cd
7 changed files with 118 additions and 54 deletions
|
|
@ -377,12 +377,9 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||
return
|
||||
}
|
||||
|
||||
// check KLINEs
|
||||
isBanned, info := server.klines.CheckMasks(c.AllNickmasks()...)
|
||||
if isBanned {
|
||||
c.Quit(info.BanMessage(c.t("You are banned from this server (%s)")), nil)
|
||||
return true
|
||||
}
|
||||
// we have nickname, username, and the final value of the IP address:
|
||||
// do the hostname lookup and set the nickmask
|
||||
session.client.lookupHostname(session, false)
|
||||
|
||||
if session.client != c {
|
||||
// reattached, bail out.
|
||||
|
|
@ -392,6 +389,13 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||
return
|
||||
}
|
||||
|
||||
// check KLINEs
|
||||
isBanned, info := server.klines.CheckMasks(c.AllNickmasks()...)
|
||||
if isBanned {
|
||||
c.Quit(info.BanMessage(c.t("You are banned from this server (%s)")), nil)
|
||||
return true
|
||||
}
|
||||
|
||||
// registration has succeeded:
|
||||
c.SetRegistered()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue