Fix up the log messages a lil
Unbutcher inviter
This commit is contained in:
@@ -10,25 +10,45 @@ function shared.Emoter.Init()
|
||||
frame:RegisterEvent("CHAT_MSG_CHANNEL")
|
||||
frame:SetScript("OnEvent", function(self, event, msg, sender, ...)
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("%s: OnEvent", ModuleName))
|
||||
shared.dumpTable(Heimdall_Data.config.emoter)
|
||||
print(string.format("[%s] Channel message received from: %s", ModuleName, sender))
|
||||
end
|
||||
|
||||
if not Heimdall_Data.config.emoter.enabled then
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("[%s] Module disabled, ignoring message", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if not Heimdall_Data.config.emoter.enabled then return end
|
||||
|
||||
local channelId = select(6, ...)
|
||||
local _, channelname = GetChannelName(channelId)
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("%s: channelname = %s", ModuleName, channelname))
|
||||
print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname))
|
||||
end
|
||||
|
||||
if channelname ~= Heimdall_Data.config.emoter.masterChannel then
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("[%s] Ignoring message from non-master channel", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if channelname ~= Heimdall_Data.config.emoter.masterChannel then return end
|
||||
|
||||
if string.find(msg, "^" .. Heimdall_Data.config.emoter.prefix) then
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("%s: msg = %s", ModuleName, msg))
|
||||
print(string.format("[%s] Found emote command in message: %s", ModuleName, msg))
|
||||
end
|
||||
local emote = string.sub(msg, string.len(Heimdall_Data.config.emoter.prefix) + 1)
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("[%s] Performing emote: %s", ModuleName, emote))
|
||||
end
|
||||
DoEmote(emote)
|
||||
elseif Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("[%s] Message does not start with emote prefix", ModuleName))
|
||||
end
|
||||
end)
|
||||
print("Heimdall - Emoter loaded")
|
||||
|
||||
if Heimdall_Data.config.emoter.debug then
|
||||
print(string.format("[%s] Module initialized", ModuleName))
|
||||
end
|
||||
print("[Heimdall] Emoter loaded")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user