-
Notifications
You must be signed in to change notification settings - Fork 70
Added handling for more ERR Replies #397
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
Conversation
Moved from osa1#344 into separate PR. Information on what this does can be found in this comment: https://github.com/osa1/tiny/pull/344/files#r706813943
osa1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @trevarj!
How did you find out about ERR_BADCHANNAME, ERR_NEEDREGGEDNICK, ERR_THROTTLE?
RFC 2812 defines these as JOIN error replies:
ERR_NEEDMOREPARAMS: 461 <-- no need to handle, command parser checks number of args
ERR_BANNEDFROMCHAN: 474 <-- handled
ERR_INVITEONLYCHAN: 473 <-- handled
ERR_BADCHANNELKEY: 475 <-- handled
ERR_CHANNELISFULL: 471 <-- handled
ERR_BADCHANMASK: 476
ERR_NOSUCHCHANNEL: 403
ERR_TOOMANYCHANNELS: 405
ERR_TOOMANYTARGETS: 407
ERR_UNAVAILRESOURCE: 437
Should we handle all of them? From the names it seems like 476 and 403 may be useful. I doubt the rest will be useful.
I found them all here. I believe this is the server implementation that libera uses, so I thought it would be good to cover anything it may send back to the client. |
|
Hmm.. Since these are not part of the standard, how do we know that another server won't use the same code for another reply? |
No idea, but you can see that some of them have RFCs and server-specific numerics documented here: |
|
Currently all errors are handled consistently, they're shown in the server tab. With this, some of the errors will be shown in the channel tab. This will add inconsistency that didn't exist before, because we don't (and can't) handle all of the errors. (We can't handle all of the errors because servers use non-standard replies, as shown in the ircdocs link above) So I argue that this actually makes the UX worse by adding an inconsistency. The motivation for this was #344: with that PR we create a channel tab on However:
I suggest in #344 we store channel settings in TUI, and when we create a tab for a channel,we use the map for channel settings to find the settings for the channel, and create the tab with that settings. Maybe something like:
Currently it seems like we're doing both of options (1) and (2): notification settings are stored in I think I prefer (2) as that means we don't duplicate information. An implication of (2) is that if we update settings for a tab, close the tab (e.g. leave a channel), then create it again (e.g. join again), we will use the updated settings instead of the ones in the config file. If we don't want that (i.e. we want to use the settings from the config file on leave and then join again) we should go with option (1). @trevarj WDYT? |
|
Jeez, I need some time to digest it. I haven't looked at or thought about this in over a year so I pretty much forgot everything that I had in mind before. I only care about the way that I use this feature in my own usecase 😈 - to set the configurations on launch only. I don't actually care about what happens on rejoin, so therefore I also don't mind (2). Maybe just close this if we will not need it in #344, and then continue the discussion over there. |
|
Closing this one. I'll move the relevant parts to #344 as a review comment. |
Moved from #344 into separate PR.
Information on what this does can be found in this comment: https://github.com/osa1/tiny/pull/344/files#r706813943