-
-
Notifications
You must be signed in to change notification settings - Fork 184
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 multiple prefix support and adds ; as a prefix. #1841
Conversation
Can this still allow you to add a single prefix if needed? |
dont merge yet found an issue i need to quickly fix |
As a string* |
Yep still supports taking a string as the Prefix for backwards compatibility |
"foxed" it |
okay yeah dont merge this im stupid and found a couple of issues i need to fix 👍 |
draft!! |
Okay made it so server.Settings.Prefix will return the first prefix if using the concat operator, this should fix a couple issues with it. |
Alright all commands have been updated to work with the new system, will check out the plugins and cores now |
there should also be an urgent message regarding these changes also |
Who should it notify? Moderators+ ? |
btw i used some metatable magic so that it shouldn't break old plugins I made it so __tostring and __concat return the first prefix in the table, only thing that will break is if you use the length operator or directly reference it |
Creator+ |
@Dimenpsyonal do you think we should do this? |
How do you people even come up with stuff like this |
Alright I'm pretty sure i've fixed everything, only thing i haven't checked are all the UI modules and frankly im far too lazy to, i tested it most of the important things matter and any remaining bugs shouldn't be too hard to fix if they do pop up |
Lint failed |
wasn't too difficult, added this line of code in the server load process if type(server.Settings.Prefix) == "table" then
setmetatable(server.Settings.Prefix, {
__concat = function(self, value)
return self[1]
end,
__tostring = function(self)
return self[1]
end,
})
end |
Fascinating |
no doubt there are more issues present since this changes the type of a core setting but they should be obvious and pop up as people use commands. |
I'm going to look into making it so you can change the prefix ingame |
okay i dont think you could ever change prefix in game for some reason |
Apparently you were never able to individually |
you shouldn't be able to unless we're talking per-player |
just realized im stupid and pasted something wrong one sec 😭 |
balls |
ill open another PR real quick to fix the stupid issue |
GOTTEM |
This simply adds the ability for commands to take multiple prefixes, I added ; and : as the default prefixes. This removes the need for #1829
Known "issues":
POF