Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make kick messages default to the kicker name instead of the kicked #1776

Merged
merged 1 commit into from Aug 13, 2021

Conversation

progval
Copy link
Contributor

@progval progval commented Aug 13, 2021

For consistency with RFC2812, Bahamut, Hybrid, Insp, Plexus4, Unreal.
https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.8

At the expense of consistency with chary/solanum, irc2, and ircu2.

Will be tested by irctest: progval/irctest#100

irc/handlers.go Outdated
@@ -1373,6 +1373,9 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
if len(msg.Params) > 2 {
comment = msg.Params[2]
}
if comment == "" {
comment = client.nick
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client.Nick()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synchronization:

ergo/irc/getters.go

Lines 148 to 152 in 4785a39

func (client *Client) Nick() string {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()
return client.nick
}

Technically, unsynchronized access to (*Client).nick is a data race, although in a context like this I think the only thing it could race against in practice is SANICK.

For consistency with RFC2812, Bahamut, Hybrid, Insp, Plexus4, Unreal.
https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.8

At the expense of consistency with chary/solanum, irc2, and ircu2.
@slingamn slingamn added this to the v2.8 milestone Aug 13, 2021
@slingamn slingamn merged commit 0d438dd into ergochat:master Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants