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

please support quotes in command #540

Open
czp3009 opened this issue Jan 20, 2023 · 0 comments
Open

please support quotes in command #540

czp3009 opened this issue Jan 20, 2023 · 0 comments

Comments

@czp3009
Copy link

czp3009 commented Jan 20, 2023

I noticed that in https://github.com/LunaMultiplayer/LunaMultiplayer/blob/master/Server/Command/Common/CommandSystemHelperMethods.cs, the handling of the command is simply split(" "). However, in many cases, the command arguments may contain spaces.

For example: /clearvessels * * * * "vessel name"

The name of vessel may contains white space, and can't be recognize in the command above.

For questions on splitting strings with quotes, please refer to https://stackoverflow.com/questions/14655023/split-a-string-that-has-white-spaces-unless-they-are-enclosed-within-quotes

I think this can help implement this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants