-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
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! |
…, test for undefined
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 |
I will try to look at |
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 ... |
This good yet? |
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 for the pr. Left some comments.
], | ||
}); | ||
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'); |
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.
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, | ||
]); |
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.
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
.
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.
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 ... ?
/who implementation allows for searching for a user as well by passing string parameter
/invite works now ... you can invite users to channels.