-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
Description
updateBlacklist is frankly a mess and needs an entire rewrite, we could use this chance to support multiple storage backends again, here's an idea how we could achieve this:
Split up updateBlacklist, currently it takes care of 5 or 6 different functions, this is horrible.
we should break it up into multiple functions, something like this:
Storage.addBan
Storage.removeBan
Storage.get(ban) -- maybe no-arg for entire banlist?
Storage.set(ban, data)Introduce a Storage interface (table with functions) with methods like:
Storage = {
get = function() end,
set = function(ban, data) end,
addBan = function(ban) end,
removeBan = function(banid?) end,
apiVersion = 1 -- possibly have an incrementing number for future features which may use the storage as well?
}
This could then be handled the same way as existing plugins, see https://github.com/Blumlaut/EasyAdmin/blob/master/client/plugins.lua
Open to suggestions on how to achieve this, this is just a small draft, i haven't actually looked at the code in years.
Reactions are currently unavailable