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

AWAY :\r\n is not handled correctly #1996

Closed
slingamn opened this issue Sep 6, 2022 · 1 comment
Closed

AWAY :\r\n is not handled correctly #1996

slingamn opened this issue Sep 6, 2022 · 1 comment
Labels
Milestone

Comments

@slingamn
Copy link
Member

slingamn commented Sep 6, 2022

(*Client).Away() treats the empty away message as though the client were un-away:

ergo/irc/getters.go

Lines 190 to 196 in 531a1d6

func (client *Client) Away() (result bool, message string) {
client.stateMutex.Lock()
message = client.awayMessage
client.stateMutex.Unlock()
result = client.awayMessage != ""
return
}

Overall this is handled inconsistently:

AWAY :
:testnet.ergo.chat 306 shivaramtest :You have been marked as being away
whois shivaramtest
:testnet.ergo.chat 311 shivaramtest shivaramtest ~u pz43x34twmg4s.oragono * r
:testnet.ergo.chat 338 shivaramtest shivaramtest [REDACTED]
:testnet.ergo.chat 379 shivaramtest shivaramtest :is using modes +Zi
:testnet.ergo.chat 671 shivaramtest shivaramtest :is using a secure connection
:testnet.ergo.chat 317 shivaramtest shivaramtest 12 1662427209 :seconds idle, signon time
:testnet.ergo.chat 318 shivaramtest shivaramtest :End of /WHOIS list
WHO shivaramtest
:testnet.ergo.chat 352 shivaramtest * ~u pz43x34twmg4s.oragono testnet.ergo.chat shivaramtest H :0 r
:testnet.ergo.chat 315 shivaramtest shivaramtest :End of WHO list
@slingamn slingamn added the bug label Sep 6, 2022
@slingamn
Copy link
Member Author

slingamn commented Sep 6, 2022

@jwheare points out that the de facto standard among server implementations is to treat an empty string parameter as "back". Our behavior is still inconsistent with the de facto standard (we send RPL_NOWAWAY in that case, even though the client is considered "back").

slingamn added a commit that referenced this issue Sep 11, 2022
@slingamn slingamn added this to the v2.11 milestone Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant