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

Adding 'all' option to /r #1186

Merged
merged 16 commits into from
Aug 19, 2023
Merged

Adding 'all' option to /r #1186

merged 16 commits into from
Aug 19, 2023

Conversation

src4026
Copy link
Contributor

@src4026 src4026 commented Jul 15, 2023

For reference: https://discord.com/channels/447819017391046687/1008040841102766153/1116006701636780184
Is this how I should do it, or is another way better?

@src4026
Copy link
Contributor Author

src4026 commented Jul 15, 2023

Why is it showing pname as undefined variable, although the code for it seems the same for me in the actual file and the one in this PR?

@165135
Copy link
Contributor

165135 commented Jul 15, 2023

Why is it showing pname as undefined variable, although the code for it seems the same for me in the actual file and the one in this PR?

I think it is because pname isn't passed into the function get_rank directly, maybe try putting it as an argument

@src4026
Copy link
Contributor Author

src4026 commented Jul 15, 2023

Why is it showing pname as undefined variable, although the code for it seems the same for me in the actual file and the one in this PR?

I think it is because pname isn't passed into the function get_rank directly, maybe try putting it as an argument

Thanks! I'll mention it here too I guess :)

@farooqkz
Copy link
Contributor

farooqkz commented Aug 3, 2023

@src4026 Try this approach instead:

  • Make the rank command function a named local function and assign it as function of the command
  • After getting information from the params, check if mode name is all
  • If it is all, create an empty return_str, iterate over all modes and append their returning str, if any, to the return_str, you have
  • Finally return this return_str

That is, you call the rank command function from itself. Please try and if you got lost, let me know :)

@src4026
Copy link
Contributor Author

src4026 commented Aug 3, 2023

Sure, thanks. I will try this approach and let you know :D 👍

@src4026
Copy link
Contributor Author

src4026 commented Aug 12, 2023

Ready for review.

@LoneWolfHT LoneWolfHT merged commit fd7f3c2 into MT-CTF:master Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants