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

Write a test for setting the hostmask when nick is in use #294

Merged
1 commit merged into from Jan 12, 2015
Merged

Write a test for setting the hostmask when nick is in use #294

1 commit merged into from Jan 12, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jan 11, 2015

... and while here, fix the hostmask calculation. It was using
the length of the message rather than the last part, therefore
wrapping incorrectly and storing the incorrect hostname.

@@ -124,7 +124,8 @@ function Client(server, nick, opt) {
// include it in messages and will truncate what we send if
// the string is too long. Therefore, we need to be considerate
// neighbors and truncate our messages accordingly.
self.hostMask = message.args[message.args.length - 1];
var welcomeStringWords = message.args[1].split(/ /);
Copy link
Collaborator

Choose a reason for hiding this comment

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

/\s+/ might be a better split pattern

... and while here, fix the hostmask calculation. It was using
the length of the message rather than the last part, therefore
wrapping incorrectly and storing the incorrect hostname.
@jirwin
Copy link
Collaborator

jirwin commented Jan 12, 2015

+1

ghost pushed a commit that referenced this pull request Jan 12, 2015
Write a test for setting the hostmask when nick is in use
@ghost ghost merged commit 9a73532 into martynsmith:master Jan 12, 2015
This pull request was closed.
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.

1 participant