Skip to content

k-lines produce a QUIT snotice without a preceding CONNECT #1941

@slingamn

Description

@slingamn

reported by @tacerus and @xnaas

See #1303 for a similar issue. K-lines are processed only after the user completes connection registration and obtains a nickname:

// check KLINEs (#671: ignore KLINEs for loopback connections)

If the user is k-lined, registration is stopped before playRegistrationBurst, which also sends the CONNECT snotice:

server.snomasks.Send(sno.LocalConnects, fmt.Sprintf("Client connected [%s] [u:%s] [h:%s] [ip:%s] [r:%s]", d.nick, d.username, session.rawHostname, session.IP().String(), d.realname))

however, (*Client).destroy() sees that the client is in fact registered and sends a QUIT snotice:

client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick))

causing confusion.

We should probably just special-case k-lines and prevent them from sending the QUIT snotice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions