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

Remove Trailing param #4

Merged
merged 1 commit into from Dec 16, 2016
Merged

Remove Trailing param #4

merged 1 commit into from Dec 16, 2016

Conversation

@DanielOaks
Copy link
Contributor

@DanielOaks DanielOaks commented Dec 12, 2016

Trailing itself shouldn't be exposed as separate from the parameters. This is because the trailing param is just a syntax hack to let the last parameter contain spaces.

As an example, these two lines are functionally identical in the IRC protocol, and both forms can be emitted by servers:

TOPIC #testchan cooltopic
TOPIC #testchan :cooltopic

In the first line, cooltopic is not trailing (since it doesn't need to be), and in the second one cooltopic is trailing. In this case, Dispatch currently fails to correctly display this. It also does the same on this for Privmsgs and such.


If using the msg.Params[len(msg.Params)-1] syntax everywhere is ugly we could always replace it with something like msg.LastParam and make sure that the last parameter is always copied into it, but I'm iffy on that since it's duplicating info.

@khlieng
Copy link
Owner

@khlieng khlieng commented Dec 16, 2016

Awesome, thanks!

Loading

@khlieng khlieng merged commit 29fad58 into khlieng:master Dec 16, 2016
1 check passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants