Add Server.getUser
This commit is contained in:
parent
3b2bb58c60
commit
3586ca3d26
@ -167,11 +167,8 @@ func (c *downstreamConn) handleMessageUnregistered(msg *irc.Message) error {
|
||||
}
|
||||
|
||||
func (c *downstreamConn) register() error {
|
||||
c.srv.lock.Lock()
|
||||
u, ok := c.srv.users[c.username]
|
||||
c.srv.lock.Unlock()
|
||||
|
||||
if !ok {
|
||||
u := c.srv.getUser(c.username)
|
||||
if u == nil {
|
||||
c.messages <- &irc.Message{
|
||||
Prefix: c.srv.prefix(),
|
||||
Command: irc.ERR_PASSWDMISMATCH,
|
||||
|
Loading…
Reference in New Issue
Block a user