-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add support for WHOIS command on IRCListener #159
base: master
Are you sure you want to change the base?
Conversation
@3V3RYONE Can you mention the client you were using to test? It seems like irssi from the screenshot. |
Hey @tinajn , yup I used irssi as the client! |
Could you also add a test for the WHOIS command to test.py? |
Surely, getting back to work on this issue latest by Monday! Will add the tests too :) |
Tested the WHOIS command, works well with the new changes 🎉 Note
Before WHOIS
After WHOIS
|
Thank you @3V3RYONE. In the process of testing code with an IRC client. Will merge once I have tested. |
This PR fixes #35
Cause of Bug
The reason of this
unknown command
bug is because there is no specific function infakenet/listeners/IRCListener.py
that deals with theWHOIS
command. Therefore, whenever theWHOIS
command is executed, the current code executes theirc_DEFAULT
function infakenet/listeners/IRCListener.py
, that displays theunknown command
message as output.Fix
I went ahead and defined a function with the name
irc_WHOIS
which deals with theWHOIS
command. I analyzed the ideal output ofWHOIS
command (executed without fakenet running), and then added the respective fields in theirc_WHOIS
function to replicate the same output.Before
27/03/23 01:45:34 PM [ IRCServer] Client issued an unknown command WHOIS IEUser
After
Note
While the output is working as expected, there is one side effect. The WHOIS command's output keeps on printing in a forever loop at the client side, even though it is executed once. While I am trying to work on this issue and fix it, I would love any help to proceed in the right direction. Thank you! :)