-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
25 lines (18 loc) · 745 Bytes
/
main.lua
File metadata and controls
25 lines (18 loc) · 745 Bytes
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
MuteList = {}
local ML = MuteList
local settings, util
local function onAddonLoaded(eventCode, addonName)
if addonName ~= "MuteList" then return end
EVENT_MANAGER:UnregisterForEvent("MuteList_OnAddonLoaded", EVENT_ADD_ON_LOADED)
util = ML.util
settings = ML.settings
settings.InitializeSettings()
local function modifySenderName(channelId, senderName, isCustomerService)
local formattedName = zo_strformat("<<1>>", senderName)
if settings.IsMuted(formattedName) then return end
return senderName
end
util.LC:registerName(modifySenderName, "MuteList")
util.InitializeSlashCommands()
end
EVENT_MANAGER:RegisterForEvent("MuteList_OnAddonLoaded", EVENT_ADD_ON_LOADED, onAddonLoaded)