-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlacklist.lua
More file actions
43 lines (36 loc) · 1.22 KB
/
Blacklist.lua
File metadata and controls
43 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
------------------------------------------
-- Blacklist Module
------------------------------------------
local MageService = MAGESERVICE
local ContainerUI = MageService.ContainerUI
------------------------------------------
-- Create the Blacklist module
------------------------------------------
local Blacklist = {}
------------------------------------------
-- Blacklist Data
------------------------------------------
-- Table to store blacklisted players
local blacklistedPlayers = {}
------------------------------------------
-- Blacklist Functions
------------------------------------------
-- Function to handle trade requests and check if player is blacklisted
function Blacklist.CheckPlayer(playerName)
if blacklistedPlayers[playerName] then
return false
end
return true
end
-- Function to add a player to the blacklist
function Blacklist.AddPlayer(playerName)
blacklistedPlayers[playerName] = true
end
-- Function to remove a player from the blacklist
function Blacklist.RemovePlayer(playerName)
blacklistedPlayers[playerName] = nil
end
------------------------------------------
-- Register the module in the addon namespace
------------------------------------------
MageService.Blacklist = Blacklist