Closed PatPeter closed 4 years ago
I typed the following on my server:
atban PatPeter 76561297984998697 1440 "He's a badmin"
It resulted in the following ban line:
PatPeter;76561297984998697;636891604550120450;"He's;|UGA|PatPeter;636890740550120450
Steps to reproduce the behavior:
atban YourName SteamID 1440 "Reason in quotes here"
The ban file should contain the ban reason with spaces.
Here's the code I use in my callvote plugin to get quoted command parameters without the command itself.
callvote
string[] quotedArgs = Regex.Matches(string.Join(" ", ev.Command), "[^\\s\"\']+|\"([^\"]*)\"|\'([^\']*)\'") .Cast<Match>() .Select(m => m.Value) .ToArray() .Skip(1) .ToArray();
However, this code does not remove the quotations so you'll have to do a trim on the result.
Yeah... that would be me doing an oopsie
While its supposed to be
Or actually, this should properly do it
Version (please complete the following information):
Describe the bug
I typed the following on my server:
atban PatPeter 76561297984998697 1440 "He's a badmin"
It resulted in the following ban line:
PatPeter;76561297984998697;636891604550120450;"He's;|UGA|PatPeter;636890740550120450
To Reproduce
Steps to reproduce the behavior:
atban YourName SteamID 1440 "Reason in quotes here"
Expected behavior
The ban file should contain the ban reason with spaces.
Additional text
Here's the code I use in my
callvote
plugin to get quoted command parameters without the command itself.However, this code does not remove the quotations so you'll have to do a trim on the result.