Fix bug with !solve
dropping additional solvers
#226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The
!solve
command is currently dropping the first additional solver, if present, when the command is called from within the challenge channel. It's working as expected in all other invocation contexts. See screenshot below.Incorrect - drops first additional solver
Incorrect - drops first and keeps second additional solver
Correct - called from within CTF channel, retains first additional solver
Correct - called from within CTF channel, retains first and second additional solvers
Solution
This patch corrects a logic error causing the first arg to be sliced off when !solve is called from within a challenge channel.
Corrected scenarios
![fix_solve+1_n-chall](https://user-images.githubusercontent.com/3689038/83935850-8280e700-a78b-11ea-86d6-83bd33cb4911.png)
![fix_solve+2_n-chall](https://user-images.githubusercontent.com/3689038/83935855-844aaa80-a78b-11ea-95f1-e865147b6da0.png)
![fix_solve+1_n-ctf](https://user-images.githubusercontent.com/3689038/83935856-86146e00-a78b-11ea-8340-4934ad669961.png)
![fix_solve+2_n-ctf](https://user-images.githubusercontent.com/3689038/83935860-8e6ca900-a78b-11ea-8e1d-83e24d858ce7.png)