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

implemented /who and /invite #59

Closed
wants to merge 24 commits into from
Closed

implemented /who and /invite #59

wants to merge 24 commits into from

Conversation

jcolson
Copy link
Contributor

@jcolson jcolson commented Feb 6, 2019

/who implementation allows for searching for a user as well by passing string parameter

/invite works now ... you can invite users to channels.

@adsr
Copy link
Owner

adsr commented Feb 8, 2019

Hey @jcolson thanks for the pr. I'll review once there are unit tests for the new features and the ci build is green. Thanks!

lib/irslackd.js Outdated Show resolved Hide resolved
lib/irslackd.js Outdated Show resolved Hide resolved
@jcolson
Copy link
Contributor Author

jcolson commented Feb 9, 2019

i'm definitely new to typescript and have no earthly idea about tape ... i've attempted to start a test for the invite functionality, but it's acting very strange ... wonder if you could give me a hint...

https://github.com/jcolson/irslackd/blob/master/tests/test_invite.js

lib/irslackd.js Show resolved Hide resolved
@adsr
Copy link
Owner

adsr commented Feb 9, 2019

I will try to look at test_invite.js tonight or tomorrow. Thanks for the features Jay.

@jcolson
Copy link
Contributor Author

jcolson commented Feb 9, 2019

I will try to look at test_invite.js tonight or tomorrow. Thanks for the features Jay.

i think i know what the issue is ... since i had the helper method calls for userids and channelids, it was getting those calls before my invite call ...

@jcolson
Copy link
Contributor Author

jcolson commented Feb 18, 2019

This good yet?

Copy link
Owner

@adsr adsr left a comment

Choose a reason for hiding this comment

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

Thanks for the pr. Left some comments.

lib/irslackd.js Show resolved Hide resolved
lib/irslackd.js Show resolved Hide resolved
tests/test_invite.js Show resolved Hide resolved
],
});
c.ircSocket.expect(':irslackd 352 test_slack_user * U1234USER irslackd example.com fun_user [email protected] 0 Nobody');
c.ircSocket.expect(':irslackd 315 test_slack_user :End of WHO');
Copy link
Owner

Choose a reason for hiding this comment

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

Below is a packet capture of a WHO response from an undernet server:

:Montreal.QC.CA.Undernet.Org 352 adam1 * adam XYZ.verizon.net *.undernet.org adam1 H :0 adam
:Montreal.QC.CA.Undernet.Org 315 adam1 adam :End of /WHO list.

To me it seems like the format should be:

:irslackd 352 <our_nick> * <their_nick> irslackd irslackd <our_nick> H :0 <their_name>

or in our case:

:irslackd 352 test_slack_user * fun_user irslackd irslackd test_slack_user H :0 Foo Bar

self.ircd.write(ircUser.socket, 'irslackd', '371', [
ircUser.ircNick,
message,
]);
Copy link
Owner

Choose a reason for hiding this comment

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

I wonder if we can catch higher up in the stack and generalize the 371 response here? Would have to add some house-keeping to track the current IRC command but then we'd have it for everything instead of just /invite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought about that, but there are some places where i'm looping that i don't want to throw out to a more generalized catch, because i want to stay in loop.

i could make it a function i guess ... ?

@jcolson jcolson closed this Feb 26, 2019
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.

2 participants