Register a saved variable in your table of contents file with the SavedVariables metadata tag.
Code:
## SavedVariables: MyAddonIgnoredUsers
Then register the ADDON_LOADED event to populate your saved variable.
Code:
local addonName = ...
local loadHandler = function(self, event, addon)
-- only proceed if our addon is the one being loaded
if addon == addonName then
-- create a new table if it doesnt exist, otherwise use the old one
MyAddonIgnoredUsers = MyAddonIgnoredUsers or {}
end
end
Then in command handler, add the user to the ignored table.
Code:
MyAddonIgnoredUsers[<insert player name here>] = true
Then in your CHAT_MSG_CHANNEL_JOIN event, check to see if their name is in the table. If it is, don't send them a message.