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

Fix /part command #222

Merged
merged 1 commit into from
Mar 26, 2016
Merged

Fix /part command #222

merged 1 commit into from
Mar 26, 2016

Conversation

maxpoulin64
Copy link
Member

Fixes the /part command closing the wrong window. The current implementation simply passes all arguments to slate, which ended up parting every arguments (and never sending the part message)

This changes the command to /part message, and always parts the current window. This will be fixed further once irc-framework is merged.

Fixes the /part command closing the wrong window. The current implementation simply passes all arguments to slate, which ended up parting every arguments.

This changes the command to `/part message`, and always parts the current window. This will be fixed further once irc-framework is merged.
@maxpoulin64 maxpoulin64 self-assigned this Mar 26, 2016
@maxpoulin64 maxpoulin64 added Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. second review needed labels Mar 26, 2016
@astorije
Copy link
Member

@maxpoulin64, so it means that if the user is currently on channel #one and types /part #two, they will leave both #one and #two? If so, that seems odd, don't you think?

Correct me if I'm wrong but the current implementation of /part seems similar (or at least, aims to be similar) to the /invite command:

  • /invite #channel nick invites nick in #channel; /part #channel parts the current user from #channel
  • /invite nick is a shorthand to invite nick to the current channel; /part is a shorthand to part the current user from the current channel

Am I being mistaken in understanding your change?

@xPaw xPaw merged commit 05ec819 into thelounge:master Mar 26, 2016
@maxpoulin64
Copy link
Member Author

@astorije

so it means that if the user is currently on channel #one and types /part #two, they will leave both #one and #two? If so, that seems odd, don't you think?

Actually that's precisely what this fixes. I will change it to /part [channel] [message] once irc-fw is merged, because I can't reliably know if [channel] is a valid channel.

@maxpoulin64 maxpoulin64 deleted the fix-part branch March 26, 2016 23:33
@astorije
Copy link
Member

I will change it to /part [channel] [message] once irc-fw is merged, because I can't reliably know if [channel] is a valid channel.

Makes sense.
I also notice that the doc says "Leave the current channel.", ouch. So doc and code were not completely consistent :-/

So now, if I type /part #channel hello world, it means I will part from the current channel and the message will be #channel hello world?

@maxpoulin64
Copy link
Member Author

So now, if I type /part #channel hello world, it means I will part from the current channel and the message will be #channel hello world?

Yes, unfortunately. That will have to wait for irc-fw however, because I need access to CHANTYPES to fix is properly.

Note that the old behavior was to try to quit everything, so /part #channel hello world would have actually attempted to quit #channel, hello and world with a part message of "undefined".

@astorije
Copy link
Member

Yes, unfortunately. That will have to wait for irc-fw however, because I need access to CHANTYPES to fix is properly.

Fine, even if not perfect, definitely much better than the current state then :-)
I therefore 👍 this PR a posteriori :D

@astorije astorije added this to the 1.4.1 milestone Apr 1, 2017
astorije added a commit that referenced this pull request Apr 12, 2018
This messes up dark themes, or really any theme that does not use #222 as body color...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants