NICK: Prevent races, remove a DoS

This commit is contained in:
Daniel Oaks
2016-11-16 12:02:22 +10:00
parent 95e36b99a2
commit 9a9820fa88
5 changed files with 54 additions and 54 deletions
-1
View File
@@ -567,7 +567,6 @@ func (server *Server) wslisten(addr string, tlsMap map[string]*TLSListenConfig)
func (server *Server) tryRegister(c *Client) {
if c.registered || !c.HasNick() || !c.HasUsername() ||
(c.capState == CapNegotiating) {
fmt.Println("Try Reg:", &c, c.registered, c.HasNick(), c.HasUsername(), c.capState == CapNegotiating, c.capState)
return
}
c.Register()