Rename dumpTable to dump and make it work with any values
This commit is contained in:
		| @@ -27,7 +27,7 @@ local function init() | |||||||
| 	---@field _L fun(key: string, locale: string): string | 	---@field _L fun(key: string, locale: string): string | ||||||
| 	---@field _Locale Localization | 	---@field _Locale Localization | ||||||
| 	---@field VERSION string | 	---@field VERSION string | ||||||
| 	---@field dumpTable fun(table: any, msg?: string, depth?: number): nil | 	---@field dump fun(table: any, msg?: string, depth?: number): nil | ||||||
| 	---@field utf8len fun(input: string): number | 	---@field utf8len fun(input: string): number | ||||||
| 	---@field padString fun(input: string, targetLength: number, left?: boolean): string | 	---@field padString fun(input: string, targetLength: number, left?: boolean): string | ||||||
| 	---@field GetOrDefault fun(table: table<any, any>, keys: string[], default: any): any | 	---@field GetOrDefault fun(table: table<any, any>, keys: string[], default: any): any | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ shared.AgentTracker = { | |||||||
| 		-- Heimdall_Data.config.agents[name] = date("%Y-%m-%dT%H:%M:%S") | 		-- Heimdall_Data.config.agents[name] = date("%Y-%m-%dT%H:%M:%S") | ||||||
| 		if Heimdall_Data.config.agentTracker.debug then | 		if Heimdall_Data.config.agentTracker.debug then | ||||||
| 			print(string.format("[%s] Tracking new agent: %s", ModuleName, name)) | 			print(string.format("[%s] Tracking new agent: %s", ModuleName, name)) | ||||||
| 			shared.dumpTable(shared.agentTracker.agents) | 			shared.dump(shared.agentTracker.agents) | ||||||
| 		end | 		end | ||||||
| 		return true | 		return true | ||||||
| 	end, | 	end, | ||||||
| @@ -137,7 +137,7 @@ shared.AgentTracker = { | |||||||
|  |  | ||||||
| 		if Heimdall_Data.config.agentTracker.debug then | 		if Heimdall_Data.config.agentTracker.debug then | ||||||
| 			print(string.format("[%s] Module initialized", ModuleName)) | 			print(string.format("[%s] Module initialized", ModuleName)) | ||||||
| 			shared.dumpTable(shared.agentTracker.agents:get(), "Agents") | 			shared.dump(shared.agentTracker.agents:get(), "Agents") | ||||||
| 		end | 		end | ||||||
| 		print("[Heimdall] AgentTracker loaded") | 		print("[Heimdall] AgentTracker loaded") | ||||||
| 	end, | 	end, | ||||||
|   | |||||||
| @@ -131,7 +131,7 @@ shared.BonkDetector = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.bonkDetector.debug then | 				if Heimdall_Data.config.bonkDetector.debug then | ||||||
| 					print(string.format("[%s] Queuing bonk detector message", ModuleName)) | 					print(string.format("[%s] Queuing bonk detector message", ModuleName)) | ||||||
| 					shared.dumpTable(message) | 					shared.dump(message) | ||||||
| 				end | 				end | ||||||
| 				table.insert(shared.messenger.queue, message) | 				table.insert(shared.messenger.queue, message) | ||||||
| 			end | 			end | ||||||
|   | |||||||
| @@ -111,7 +111,7 @@ shared.CombatAlerter = { | |||||||
| 					} | 					} | ||||||
| 					if Heimdall_Data.config.combatAlerter.debug then | 					if Heimdall_Data.config.combatAlerter.debug then | ||||||
| 						print(string.format("[%s] Queuing alert message", ModuleName)) | 						print(string.format("[%s] Queuing alert message", ModuleName)) | ||||||
| 						shared.dumpTable(msg) | 						shared.dump(msg) | ||||||
| 					end | 					end | ||||||
| 					table.insert(shared.messenger.queue, msg) | 					table.insert(shared.messenger.queue, msg) | ||||||
| 				end | 				end | ||||||
|   | |||||||
| @@ -161,7 +161,7 @@ shared.Commander = { | |||||||
| 		local function WhoPartitionedStinkies() | 		local function WhoPartitionedStinkies() | ||||||
| 			if Heimdall_Data.config.commander.debug then | 			if Heimdall_Data.config.commander.debug then | ||||||
| 				print(string.format("[%s] Executing: WhoPartitionedStinkies", ModuleName)) | 				print(string.format("[%s] Executing: WhoPartitionedStinkies", ModuleName)) | ||||||
| 				shared.dumpTable(HeimdallStinkies) | 				shared.dump(HeimdallStinkies) | ||||||
| 			end | 			end | ||||||
| 			local res = WhoPartitioned(HeimdallStinkies) | 			local res = WhoPartitioned(HeimdallStinkies) | ||||||
| 			if #res == 0 then return { "No stinkies found" } end | 			if #res == 0 then return { "No stinkies found" } end | ||||||
| @@ -304,7 +304,7 @@ shared.Commander = { | |||||||
| 		commanderChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | 		commanderChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | ||||||
| 			--if Heimdall_Data.config.commander.debug then | 			--if Heimdall_Data.config.commander.debug then | ||||||
| 			--	print(string.format("[%s] Event received", ModuleName)) | 			--	print(string.format("[%s] Event received", ModuleName)) | ||||||
| 			--	shared.dumpTable(Heimdall_Data.config.commander) | 			--	shared.dump(Heimdall_Data.config.commander) | ||||||
| 			--end | 			--end | ||||||
| 			if not Heimdall_Data.config.commander.enabled then | 			if not Heimdall_Data.config.commander.enabled then | ||||||
| 				--if Heimdall_Data.config.commander.debug then | 				--if Heimdall_Data.config.commander.debug then | ||||||
| @@ -338,7 +338,7 @@ shared.Commander = { | |||||||
| 			sender = string.match(sender, "^[^-]+") | 			sender = string.match(sender, "^[^-]+") | ||||||
| 			if Heimdall_Data.config.commander.debug then | 			if Heimdall_Data.config.commander.debug then | ||||||
| 				print(string.format("[%s] Message from: %s", ModuleName, sender)) | 				print(string.format("[%s] Message from: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.commander) | 				shared.dump(Heimdall_Data.config.commander) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			for _, command in ipairs(commands) do | 			for _, command in ipairs(commands) do | ||||||
| @@ -353,6 +353,7 @@ shared.Commander = { | |||||||
| 					and ( | 					and ( | ||||||
| 						not command.commanderOnly | 						not command.commanderOnly | ||||||
| 						-- if Heimdall_Data.config.commander.debug then print(string.format("[%s] Ignoring command, sender %s not commander %s", ModuleName, sender, Heimdall_Data.config.commander.commander)) end | 						-- if Heimdall_Data.config.commander.debug then print(string.format("[%s] Ignoring command, sender %s not commander %s", ModuleName, sender, Heimdall_Data.config.commander.commander)) end | ||||||
|  |  | ||||||
| 						or (command.commanderOnly and sender == Heimdall_Data.config.commander.commander) | 						or (command.commanderOnly and sender == Heimdall_Data.config.commander.commander) | ||||||
| 					) | 					) | ||||||
| 				then | 				then | ||||||
| @@ -361,7 +362,7 @@ shared.Commander = { | |||||||
| 						local messages = command.callback({ strsplit(",", msg) }) | 						local messages = command.callback({ strsplit(",", msg) }) | ||||||
| 						if Heimdall_Data.config.commander.debug then | 						if Heimdall_Data.config.commander.debug then | ||||||
| 							print(string.format("[%s] Messages to send: %s", ModuleName)) | 							print(string.format("[%s] Messages to send: %s", ModuleName)) | ||||||
| 							print(string.format("[%s] Messages to send: %s", ModuleName)) | 							shared.dump(messages) | ||||||
| 						end | 						end | ||||||
| 						for _, message in ipairs(messages) do | 						for _, message in ipairs(messages) do | ||||||
| 							---@type Message | 							---@type Message | ||||||
| @@ -372,7 +373,7 @@ shared.Commander = { | |||||||
| 							} | 							} | ||||||
| 							if Heimdall_Data.config.commander.debug then | 							if Heimdall_Data.config.commander.debug then | ||||||
| 								print(string.format("[%s] Queuing message", ModuleName)) | 								print(string.format("[%s] Queuing message", ModuleName)) | ||||||
| 								print(string.format("[%s] Queuing message", ModuleName)) | 								shared.dump(msg) | ||||||
| 							end | 							end | ||||||
| 							--table.insert(shared.messenger.queue, msg) | 							--table.insert(shared.messenger.queue, msg) | ||||||
| 							table.insert(shared.networkMessenger.queue, returnmsg) | 							table.insert(shared.networkMessenger.queue, returnmsg) | ||||||
|   | |||||||
| @@ -709,7 +709,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.spotter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.spotter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.spotter.channels) | 					shared.dump(Heimdall_Data.config.spotter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			spotterConfigFrame:Add(channels, 2, 4) | 			spotterConfigFrame:Add(channels, 2, 4) | ||||||
| @@ -809,7 +809,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.who.channels = StringToArray(text, ",") | 					Heimdall_Data.config.who.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.who.channels) | 					shared.dump(Heimdall_Data.config.who.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			whoerConfigFrame:Add(channels, 2, 3) | 			whoerConfigFrame:Add(channels, 2, 3) | ||||||
| @@ -1021,7 +1021,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.deathReporter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.deathReporter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.deathReporter.channels) | 					shared.dump(Heimdall_Data.config.deathReporter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			deathReporterConfigFrame:Add(channels, 2, 6) | 			deathReporterConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1146,7 +1146,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.inviter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.inviter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.inviter.channels) | 					shared.dump(Heimdall_Data.config.inviter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			inviterConfigFrame:Add(channels, 2, 6) | 			inviterConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1301,7 +1301,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.agentTracker.channels = StringToArray(text, ",") | 					Heimdall_Data.config.agentTracker.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.agentTracker.channels) | 					shared.dump(Heimdall_Data.config.agentTracker.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			agentTrackerConfigFrame:Add(channels, 2, 6) | 			agentTrackerConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1354,7 +1354,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.stinkyTracker.channels = StringToArray(text, ",") | 					Heimdall_Data.config.stinkyTracker.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.stinkyTracker.channels) | 					shared.dump(Heimdall_Data.config.stinkyTracker.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			stinkyTrackerConfigFrame:Add(channels, 2, 6) | 			stinkyTrackerConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1407,7 +1407,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.emoter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.emoter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.emoter.channels) | 					shared.dump(Heimdall_Data.config.emoter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			emoterConfigFrame:Add(channels, 2, 6) | 			emoterConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1478,7 +1478,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.echoer.channels = StringToArray(text, ",") | 					Heimdall_Data.config.echoer.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.echoer.channels) | 					shared.dump(Heimdall_Data.config.echoer.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			echoerConfigFrame:Add(channels, 2, 6) | 			echoerConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1549,7 +1549,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.commander.channels = StringToArray(text, ",") | 					Heimdall_Data.config.commander.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.commander.channels) | 					shared.dump(Heimdall_Data.config.commander.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			commanderConfigFrame:Add(channels, 2, 6) | 			commanderConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1683,7 +1683,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.combatAlerter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.combatAlerter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.combatAlerter.channels) | 					shared.dump(Heimdall_Data.config.combatAlerter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			combatAlerterConfigFrame:Add(channels, 2, 6) | 			combatAlerterConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1748,7 +1748,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.sniffer.channels = StringToArray(text, ",") | 					Heimdall_Data.config.sniffer.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.sniffer.channels) | 					shared.dump(Heimdall_Data.config.sniffer.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			snifferConfigFrame:Add(channels, 2, 6) | 			snifferConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1838,7 +1838,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.bonkDetector.channels = StringToArray(text, ",") | 					Heimdall_Data.config.bonkDetector.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.bonkDetector.channels) | 					shared.dump(Heimdall_Data.config.bonkDetector.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			bonkDetectorConfigFrame:Add(channels, 2, 6) | 			bonkDetectorConfigFrame:Add(channels, 2, 6) | ||||||
| @@ -1909,7 +1909,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.minimapTagger.channels = StringToArray(text, ",") | 					Heimdall_Data.config.minimapTagger.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.minimapTagger.channels) | 					shared.dump(Heimdall_Data.config.minimapTagger.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			minimapTaggerConfigFrame:Add(channels, 2, 3) | 			minimapTaggerConfigFrame:Add(channels, 2, 3) | ||||||
| @@ -2278,7 +2278,7 @@ shared.Config = { | |||||||
| 					local text = self:GetText() | 					local text = self:GetText() | ||||||
| 					Heimdall_Data.config.noter.channels = StringToArray(text, ",") | 					Heimdall_Data.config.noter.channels = StringToArray(text, ",") | ||||||
| 					print("Channels set to") | 					print("Channels set to") | ||||||
| 					shared.dumpTable(Heimdall_Data.config.noter.channels) | 					shared.dump(Heimdall_Data.config.noter.channels) | ||||||
| 				end | 				end | ||||||
| 			) | 			) | ||||||
| 			noterConfigFrame:Add(channels, 2, 6) | 			noterConfigFrame:Add(channels, 2, 6) | ||||||
|   | |||||||
| @@ -178,7 +178,7 @@ shared.DeathReporter = { | |||||||
| 					} | 					} | ||||||
| 					if Heimdall_Data.config.deathReporter.debug then | 					if Heimdall_Data.config.deathReporter.debug then | ||||||
| 						print(string.format("[%s] Queuing death report message", ModuleName)) | 						print(string.format("[%s] Queuing death report message", ModuleName)) | ||||||
| 						shared.dumpTable(msg) | 						shared.dump(msg) | ||||||
| 					end | 					end | ||||||
| 					table.insert(shared.messenger.queue, msg) | 					table.insert(shared.messenger.queue, msg) | ||||||
| 				end | 				end | ||||||
|   | |||||||
| @@ -1,25 +1,29 @@ | |||||||
| local _, shared = ... | local _, shared = ... | ||||||
| ---@cast shared HeimdallShared | ---@cast shared HeimdallShared | ||||||
|  |  | ||||||
| if not shared.dumpTable then | if not shared.dump then | ||||||
| 	---@param table table | 	---@param value any | ||||||
| 	---@param msg string? | 	---@param msg string? | ||||||
| 	---@param depth number? | 	---@param depth number? | ||||||
| 	shared.dumpTable = function(table, msg, depth) | 	shared.dump = function(value, msg, depth) | ||||||
| 		if not table then | 		if not value then | ||||||
| 			print(tostring(table)) | 			print(tostring(value)) | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  | 		if type(value) ~= "table" then | ||||||
|  | 			print(tostring(value)) | ||||||
| 			return | 			return | ||||||
| 		end | 		end | ||||||
| 		if msg then print(msg) end | 		if msg then print(msg) end | ||||||
| 		if depth == nil then depth = 0 end | 		if depth == nil then depth = 0 end | ||||||
| 		if depth > 200 then | 		if depth > 200 then | ||||||
| 			print("Error: Depth > 200 in dumpTable()") | 			print("Error: Depth > 200 in dump()") | ||||||
| 			return | 			return | ||||||
| 		end | 		end | ||||||
| 		for k, v in pairs(table) do | 		for k, v in pairs(value) do | ||||||
| 			if type(v) == "table" then | 			if type(v) == "table" then | ||||||
| 				print(string.rep("  ", depth) .. tostring(k) .. ":") | 				print(string.rep("  ", depth) .. tostring(k) .. ":") | ||||||
| 				shared.dumpTable(v, nil, depth + 1) | 				shared.dump(v, msg, depth + 1) | ||||||
| 			else | 			else | ||||||
| 				print(string.rep("  ", depth) .. tostring(k) .. ": " .. tostring(v)) | 				print(string.rep("  ", depth) .. tostring(k) .. ": " .. tostring(v)) | ||||||
| 			end | 			end | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ shared.Echoer = { | |||||||
| 			end | 			end | ||||||
| 			if Heimdall_Data.config.echoer.debug then | 			if Heimdall_Data.config.echoer.debug then | ||||||
| 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.echoer) | 				shared.dump(Heimdall_Data.config.echoer) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			if string.find(msg, "^" .. Heimdall_Data.config.echoer.prefix) then | 			if string.find(msg, "^" .. Heimdall_Data.config.echoer.prefix) then | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ shared.Emoter = { | |||||||
|  |  | ||||||
| 			if Heimdall_Data.config.emoter.debug then | 			if Heimdall_Data.config.emoter.debug then | ||||||
| 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.emoter) | 				shared.dump(Heimdall_Data.config.emoter) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			if string.find(msg, "^" .. Heimdall_Data.config.emoter.prefix) then | 			if string.find(msg, "^" .. Heimdall_Data.config.emoter.prefix) then | ||||||
|   | |||||||
| @@ -214,7 +214,7 @@ shared.Inviter = { | |||||||
| 		inviterChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | 		inviterChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | ||||||
| 			--if Heimdall_Data.config.inviter.debug then | 			--if Heimdall_Data.config.inviter.debug then | ||||||
| 			--	print(string.format("[%s] Chat message received: %s", ModuleName, msg)) | 			--	print(string.format("[%s] Chat message received: %s", ModuleName, msg)) | ||||||
| 			--	shared.dumpTable(Heimdall_Data.config.inviter) | 			--	shared.dump(Heimdall_Data.config.inviter) | ||||||
| 			--end | 			--end | ||||||
| 			if not Heimdall_Data.config.inviter.enabled then return end | 			if not Heimdall_Data.config.inviter.enabled then return end | ||||||
| 			local channelId = select(6, ...) | 			local channelId = select(6, ...) | ||||||
|   | |||||||
| @@ -67,7 +67,7 @@ shared.Macroer = { | |||||||
|  |  | ||||||
| 			if Heimdall_Data.config.macroer.debug then | 			if Heimdall_Data.config.macroer.debug then | ||||||
| 				print(string.format("[%s] Sorted stinkies: %d", ModuleName, #sortedStinkies)) | 				print(string.format("[%s] Sorted stinkies: %d", ModuleName, #sortedStinkies)) | ||||||
| 				shared.dumpTable(sortedStinkies) | 				shared.dump(sortedStinkies) | ||||||
| 			end | 			end | ||||||
| 			local lines = { "/targetenemy" } | 			local lines = { "/targetenemy" } | ||||||
| 			for _, stinky in pairs(sortedStinkies) do | 			for _, stinky in pairs(sortedStinkies) do | ||||||
| @@ -91,7 +91,7 @@ shared.Macroer = { | |||||||
| 		shared.StinkyTracker.OnChange(function(stinkies) | 		shared.StinkyTracker.OnChange(function(stinkies) | ||||||
| 			if Heimdall_Data.config.macroer.debug then | 			if Heimdall_Data.config.macroer.debug then | ||||||
| 				print(string.format("[%s] Stinkies changed, updating macro", ModuleName)) | 				print(string.format("[%s] Stinkies changed, updating macro", ModuleName)) | ||||||
| 				shared.dumpTable(stinkies) | 				shared.dump(stinkies) | ||||||
| 			end | 			end | ||||||
| 			FixMacro(stinkies) | 			FixMacro(stinkies) | ||||||
| 		end) | 		end) | ||||||
|   | |||||||
| @@ -72,18 +72,18 @@ shared.Messenger = { | |||||||
| 					return | 					return | ||||||
| 				end | 				end | ||||||
|  |  | ||||||
| 				if Heimdall_Data.config.messenger.debug then shared.dumpTable(message, "[%s] Processing message:") end | 				if Heimdall_Data.config.messenger.debug then shared.dump(message, "[%s] Processing message:") end | ||||||
|  |  | ||||||
| 				if not message.message or message.message == "" then | 				if not message.message or message.message == "" then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable(message, string.format("[%s] Invalid message: empty content", ModuleName)) | 						shared.dump(message, string.format("[%s] Invalid message: empty content", ModuleName)) | ||||||
| 					end | 					end | ||||||
| 					return | 					return | ||||||
| 				end | 				end | ||||||
|  |  | ||||||
| 				if not message.channel or message.channel == "" then | 				if not message.channel or message.channel == "" then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable( | 						shared.dump( | ||||||
| 							message, | 							message, | ||||||
| 							string.format("[%s] Invalid message: no channel specified", ModuleName) | 							string.format("[%s] Invalid message: no channel specified", ModuleName) | ||||||
| 						) | 						) | ||||||
| @@ -93,7 +93,7 @@ shared.Messenger = { | |||||||
|  |  | ||||||
| 				if string.find(message.channel, "^C") then | 				if string.find(message.channel, "^C") then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable( | 						shared.dump( | ||||||
| 							message, | 							message, | ||||||
| 							string.format("[%s] Converting channel type from C to CHANNEL", ModuleName) | 							string.format("[%s] Converting channel type from C to CHANNEL", ModuleName) | ||||||
| 						) | 						) | ||||||
| @@ -101,7 +101,7 @@ shared.Messenger = { | |||||||
| 					message.channel = "CHANNEL" | 					message.channel = "CHANNEL" | ||||||
| 				elseif string.find(message.channel, "^W") then | 				elseif string.find(message.channel, "^W") then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable( | 						shared.dump( | ||||||
| 							message, | 							message, | ||||||
| 							string.format("[%s] Converting channel type from W to WHISPER", ModuleName) | 							string.format("[%s] Converting channel type from W to WHISPER", ModuleName) | ||||||
| 						) | 						) | ||||||
| @@ -111,12 +111,12 @@ shared.Messenger = { | |||||||
|  |  | ||||||
| 				if message.channel == "CHANNEL" and message.data and string.match(message.data, "%D") then | 				if message.channel == "CHANNEL" and message.data and string.match(message.data, "%D") then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable(message, string.format("[%s] Processing channel message:", ModuleName)) | 						shared.dump(message, string.format("[%s] Processing channel message:", ModuleName)) | ||||||
| 					end | 					end | ||||||
| 					local channelId = GetChannelName(message.data) | 					local channelId = GetChannelName(message.data) | ||||||
| 					if channelId == 0 then | 					if channelId == 0 then | ||||||
| 						if Heimdall_Data.config.messenger.debug then | 						if Heimdall_Data.config.messenger.debug then | ||||||
| 							shared.dumpTable(message, string.format("[%s] Channel not found, joining:", ModuleName)) | 							shared.dump(message, string.format("[%s] Channel not found, joining:", ModuleName)) | ||||||
| 						end | 						end | ||||||
| 						channelId = FindOrJoinChannel(message.data) | 						channelId = FindOrJoinChannel(message.data) | ||||||
| 						if Heimdall_Data.config.messenger.debug then | 						if Heimdall_Data.config.messenger.debug then | ||||||
| @@ -129,28 +129,28 @@ shared.Messenger = { | |||||||
| 				table.remove(shared.messenger.queue, 1) | 				table.remove(shared.messenger.queue, 1) | ||||||
| 				if not message.message or message.message == "" then | 				if not message.message or message.message == "" then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable(message, string.format("[%s] Skipping empty message", ModuleName)) | 						shared.dump(message, string.format("[%s] Skipping empty message", ModuleName)) | ||||||
| 					end | 					end | ||||||
| 					return | 					return | ||||||
| 				end | 				end | ||||||
| 				if not message.channel or message.channel == "" then | 				if not message.channel or message.channel == "" then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable(message, string.format("[%s] Skipping message with no channel", ModuleName)) | 						shared.dump(message, string.format("[%s] Skipping message with no channel", ModuleName)) | ||||||
| 					end | 					end | ||||||
| 					return | 					return | ||||||
| 				end | 				end | ||||||
| 				if not message.data or message.data == "" then | 				if not message.data or message.data == "" then | ||||||
| 					if Heimdall_Data.config.messenger.debug then | 					if Heimdall_Data.config.messenger.debug then | ||||||
| 						shared.dumpTable(message, string.format("[%s] Skipping message with no data", ModuleName)) | 						shared.dump(message, string.format("[%s] Skipping message with no data", ModuleName)) | ||||||
| 					end | 					end | ||||||
| 					return | 					return | ||||||
| 				end | 				end | ||||||
|  |  | ||||||
| 				if Heimdall_Data.config.messenger.debug then | 				if Heimdall_Data.config.messenger.debug then | ||||||
| 					shared.dumpTable(message, string.format("[%s] Sending message:", ModuleName)) | 					shared.dump(message, string.format("[%s] Sending message:", ModuleName)) | ||||||
| 				end | 				end | ||||||
| 				if string.len(message.message) > 255 then | 				if string.len(message.message) > 255 then | ||||||
| 					shared.dumpTable( | 					shared.dump( | ||||||
| 						message, | 						message, | ||||||
| 						string.format("[%s] Message too long!!!!: %s", ModuleName, message.message) | 						string.format("[%s] Message too long!!!!: %s", ModuleName, message.message) | ||||||
| 					) | 					) | ||||||
|   | |||||||
| @@ -473,7 +473,7 @@ shared.MinimapTagger = { | |||||||
| 			end | 			end | ||||||
| 			if Heimdall_Data.config.minimapTagger.debug then | 			if Heimdall_Data.config.minimapTagger.debug then | ||||||
| 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.minimapTagger) | 				shared.dump(Heimdall_Data.config.minimapTagger) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			local doTag = true | 			local doTag = true | ||||||
|   | |||||||
| @@ -61,7 +61,7 @@ shared.Network = { | |||||||
| 			end | 			end | ||||||
| 			if Heimdall_Data.config.network.debug then | 			if Heimdall_Data.config.network.debug then | ||||||
| 				print(string.format("[%s] Network nodes:", ModuleName)) | 				print(string.format("[%s] Network nodes:", ModuleName)) | ||||||
| 				shared.dumpTable(shared.networkNodes) | 				shared.dump(shared.networkNodes) | ||||||
| 			end | 			end | ||||||
| 		end | 		end | ||||||
|  |  | ||||||
|   | |||||||
| @@ -143,7 +143,7 @@ shared.NetworkMessenger = { | |||||||
| 			local parts = shared.Split(message, "|") | 			local parts = shared.Split(message, "|") | ||||||
| 			if Heimdall_Data.config.networkMessenger.debug then | 			if Heimdall_Data.config.networkMessenger.debug then | ||||||
| 				print(string.format("[%s] Received message parts:", ModuleName)) | 				print(string.format("[%s] Received message parts:", ModuleName)) | ||||||
| 				shared.dumpTable(parts) | 				shared.dump(parts) | ||||||
| 			end | 			end | ||||||
| 			local command = strtrim(parts[1]) | 			local command = strtrim(parts[1]) | ||||||
| 			if command == "message" then | 			if command == "message" then | ||||||
|   | |||||||
| @@ -67,7 +67,7 @@ shared.Noter = { | |||||||
| 				local indices = shared.Split(range, "..") | 				local indices = shared.Split(range, "..") | ||||||
| 				if Heimdall_Data.config.noter.debug then | 				if Heimdall_Data.config.noter.debug then | ||||||
| 					print(string.format("[%s] Indices for range deletion: %s", ModuleName, table.concat(indices, ", "))) | 					print(string.format("[%s] Indices for range deletion: %s", ModuleName, table.concat(indices, ", "))) | ||||||
| 					shared.dumpTable(indices) | 					shared.dump(indices) | ||||||
| 				end | 				end | ||||||
| 				local start = tonumber(indices[1]) | 				local start = tonumber(indices[1]) | ||||||
| 				local finish = tonumber(indices[2]) | 				local finish = tonumber(indices[2]) | ||||||
| @@ -98,7 +98,7 @@ shared.Noter = { | |||||||
| 					else | 					else | ||||||
| 						if Heimdall_Data.config.noter.debug then | 						if Heimdall_Data.config.noter.debug then | ||||||
| 							print(string.format("[%s] Deleting note %s at index %s", ModuleName, name, i)) | 							print(string.format("[%s] Deleting note %s at index %s", ModuleName, name, i)) | ||||||
| 							shared.dumpTable(Heimdall_Data.config.notes[name][i]) | 							shared.dump(Heimdall_Data.config.notes[name][i]) | ||||||
| 						end | 						end | ||||||
| 						Heimdall_Data.config.notes[name][i] = nil | 						Heimdall_Data.config.notes[name][i] = nil | ||||||
| 					end | 					end | ||||||
| @@ -159,7 +159,7 @@ shared.Noter = { | |||||||
| 				local indices = shared.Split(range, "..") | 				local indices = shared.Split(range, "..") | ||||||
| 				if Heimdall_Data.config.noter.debug then | 				if Heimdall_Data.config.noter.debug then | ||||||
| 					print(string.format("[%s] Indices for range printing: %s", ModuleName, table.concat(indices, ", "))) | 					print(string.format("[%s] Indices for range printing: %s", ModuleName, table.concat(indices, ", "))) | ||||||
| 					shared.dumpTable(indices) | 					shared.dump(indices) | ||||||
| 				end | 				end | ||||||
| 				local start = tonumber(indices[1]) | 				local start = tonumber(indices[1]) | ||||||
| 				local finish = tonumber(indices[2]) | 				local finish = tonumber(indices[2]) | ||||||
| @@ -185,7 +185,7 @@ shared.Noter = { | |||||||
| 					else | 					else | ||||||
| 						if Heimdall_Data.config.noter.debug then | 						if Heimdall_Data.config.noter.debug then | ||||||
| 							print(string.format("[%s] Printing note %s at index %s", ModuleName, name, i)) | 							print(string.format("[%s] Printing note %s at index %s", ModuleName, name, i)) | ||||||
| 							shared.dumpTable(Heimdall_Data.config.notes[name][i]) | 							shared.dump(Heimdall_Data.config.notes[name][i]) | ||||||
| 						end | 						end | ||||||
| 						PrintNote(channel, i, Heimdall_Data.config.notes[name][i]) | 						PrintNote(channel, i, Heimdall_Data.config.notes[name][i]) | ||||||
| 					end | 					end | ||||||
| @@ -200,7 +200,7 @@ shared.Noter = { | |||||||
| 			if not Heimdall_Data.config.notes[name] then Heimdall_Data.config.notes[name] = {} end | 			if not Heimdall_Data.config.notes[name] then Heimdall_Data.config.notes[name] = {} end | ||||||
| 			if Heimdall_Data.config.noter.debug then | 			if Heimdall_Data.config.noter.debug then | ||||||
| 				print(string.format("[%s] Adding note for: %s from: %s", ModuleName, name, sender)) | 				print(string.format("[%s] Adding note for: %s from: %s", ModuleName, name, sender)) | ||||||
| 				shared.dumpTable(args) | 				shared.dump(args) | ||||||
| 			end | 			end | ||||||
| 			local msgparts = {} | 			local msgparts = {} | ||||||
| 			for i = 3, #args do | 			for i = 3, #args do | ||||||
| @@ -221,7 +221,7 @@ shared.Noter = { | |||||||
|  |  | ||||||
| 			if Heimdall_Data.config.noter.debug then | 			if Heimdall_Data.config.noter.debug then | ||||||
| 				print(string.format("[%s] Adding note", ModuleName)) | 				print(string.format("[%s] Adding note", ModuleName)) | ||||||
| 				shared.dumpTable(note) | 				shared.dump(note) | ||||||
| 			end | 			end | ||||||
| 			table.insert(Heimdall_Data.config.notes[name], note) | 			table.insert(Heimdall_Data.config.notes[name], note) | ||||||
| 		end | 		end | ||||||
| @@ -239,7 +239,7 @@ shared.Noter = { | |||||||
| 		noterChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | 		noterChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) | ||||||
| 			--if Heimdall_Data.config.noter.debug then | 			--if Heimdall_Data.config.noter.debug then | ||||||
| 			--	print(string.format("[%s] Event received", ModuleName)) | 			--	print(string.format("[%s] Event received", ModuleName)) | ||||||
| 			--	shared.dumpTable(Heimdall_Data.config.noter) | 			--	shared.dump(Heimdall_Data.config.noter) | ||||||
| 			--end | 			--end | ||||||
| 			if not Heimdall_Data.config.noter.enabled then | 			if not Heimdall_Data.config.noter.enabled then | ||||||
| 				--if Heimdall_Data.config.noter.debug then | 				--if Heimdall_Data.config.noter.debug then | ||||||
| @@ -266,7 +266,7 @@ shared.Noter = { | |||||||
| 			sender = string.match(sender, "^[^-]+") | 			sender = string.match(sender, "^[^-]+") | ||||||
| 			if Heimdall_Data.config.noter.debug then | 			if Heimdall_Data.config.noter.debug then | ||||||
| 				print(string.format("[%s] Message from: %s", ModuleName, sender)) | 				print(string.format("[%s] Message from: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.noter) | 				shared.dump(Heimdall_Data.config.noter) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			if not msg or msg == "" then | 			if not msg or msg == "" then | ||||||
| @@ -279,7 +279,7 @@ shared.Noter = { | |||||||
| 			local args = { strsplit(" ", msg) } | 			local args = { strsplit(" ", msg) } | ||||||
| 			if Heimdall_Data.config.noter.debug then | 			if Heimdall_Data.config.noter.debug then | ||||||
| 				print(string.format("[%s] Arguments received: %s", ModuleName, table.concat(args, ", "))) | 				print(string.format("[%s] Arguments received: %s", ModuleName, table.concat(args, ", "))) | ||||||
| 				shared.dumpTable(args) | 				shared.dump(args) | ||||||
| 			end | 			end | ||||||
| 			local command = args[1] | 			local command = args[1] | ||||||
| 			if command == "note" then | 			if command == "note" then | ||||||
|   | |||||||
| @@ -483,7 +483,7 @@ local function Init() | |||||||
| 	-- S local clbk = test:onChange(function(value) | 	-- S local clbk = test:onChange(function(value) | ||||||
| 	-- S     invocations = invocations + 1 | 	-- S     invocations = invocations + 1 | ||||||
| 	-- S     print("test changed to") | 	-- S     print("test changed to") | ||||||
| 	-- S     dumpTable(value, 0) | 	-- S     dump(value, 0) | ||||||
| 	-- S end) | 	-- S end) | ||||||
| 	-- S test:set({1, 2, 3, 4}) | 	-- S test:set({1, 2, 3, 4}) | ||||||
| 	-- S assert(invocations == 1) | 	-- S assert(invocations == 1) | ||||||
| @@ -516,7 +516,7 @@ local function Init() | |||||||
| 	-- S test:once(function(value) | 	-- S test:once(function(value) | ||||||
| 	-- S     invocations = invocations + 1 | 	-- S     invocations = invocations + 1 | ||||||
| 	-- S     print("test changed to") | 	-- S     print("test changed to") | ||||||
| 	-- S     dumpTable(value, 0) | 	-- S     dump(value, 0) | ||||||
| 	-- S end) | 	-- S end) | ||||||
| 	-- S test:set({3, 2, 1}) | 	-- S test:set({3, 2, 1}) | ||||||
| 	-- S assert(invocations == 1) | 	-- S assert(invocations == 1) | ||||||
| @@ -527,7 +527,7 @@ local function Init() | |||||||
| 	-- S test:onChange(function(value) | 	-- S test:onChange(function(value) | ||||||
| 	-- S     invocations = invocations + 1 | 	-- S     invocations = invocations + 1 | ||||||
| 	-- S     print("test changed to") | 	-- S     print("test changed to") | ||||||
| 	-- S     dumpTable(value, 0) | 	-- S     dump(value, 0) | ||||||
| 	-- S end) | 	-- S end) | ||||||
| 	-- S test:onAnyFieldChange(function(field, value) | 	-- S test:onAnyFieldChange(function(field, value) | ||||||
| 	-- S     invocations = invocations + 1 | 	-- S     invocations = invocations + 1 | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ shared.Sniffer = { | |||||||
| 		local SmellStinky = function(stinky) | 		local SmellStinky = function(stinky) | ||||||
| 			if Heimdall_Data.config.sniffer.debug then | 			if Heimdall_Data.config.sniffer.debug then | ||||||
| 				print(string.format("%s: SmellStinky", ModuleName)) | 				print(string.format("%s: SmellStinky", ModuleName)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.sniffer) | 				shared.dump(Heimdall_Data.config.sniffer) | ||||||
| 			end | 			end | ||||||
| 			if not Heimdall_Data.config.sniffer.enabled then return end | 			if not Heimdall_Data.config.sniffer.enabled then return end | ||||||
| 			if Heimdall_Data.config.sniffer.stinky and not shared.IsStinky(stinky) then | 			if Heimdall_Data.config.sniffer.stinky and not shared.IsStinky(stinky) then | ||||||
| @@ -44,7 +44,7 @@ shared.Sniffer = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.sniffer.debug then | 				if Heimdall_Data.config.sniffer.debug then | ||||||
| 					print(string.format("[%s] Queuing sniffer message", ModuleName)) | 					print(string.format("[%s] Queuing sniffer message", ModuleName)) | ||||||
| 					shared.dumpTable(msg) | 					shared.dump(msg) | ||||||
| 				end | 				end | ||||||
| 				table.insert(shared.messenger.queue, msg) | 				table.insert(shared.messenger.queue, msg) | ||||||
| 			end | 			end | ||||||
|   | |||||||
| @@ -201,7 +201,7 @@ shared.Spotter = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.spotter.debug then | 				if Heimdall_Data.config.spotter.debug then | ||||||
| 					print(string.format("[%s] Queuing spotter message", ModuleName)) | 					print(string.format("[%s] Queuing spotter message", ModuleName)) | ||||||
| 					shared.dumpTable(msg) | 					shared.dump(msg) | ||||||
| 				end | 				end | ||||||
| 				table.insert(shared.messenger.queue, msg) | 				table.insert(shared.messenger.queue, msg) | ||||||
| 			end | 			end | ||||||
|   | |||||||
| @@ -38,8 +38,8 @@ shared.StinkyTracker = { | |||||||
| 						stinky.class | 						stinky.class | ||||||
| 					) | 					) | ||||||
| 				) | 				) | ||||||
| 				shared.dumpTable(shared.stinkyTracker.ignored:get()) | 				shared.dump(shared.stinkyTracker.ignored:get()) | ||||||
| 				shared.dumpTable(shared.stinkyTracker.stinkies:get()) | 				shared.dump(shared.stinkyTracker.stinkies:get()) | ||||||
| 			end | 			end | ||||||
| 			return false | 			return false | ||||||
| 		else | 		else | ||||||
| @@ -50,8 +50,8 @@ shared.StinkyTracker = { | |||||||
| 		shared.stinkyTracker.stinkies[stinky.name] = stinky | 		shared.stinkyTracker.stinkies[stinky.name] = stinky | ||||||
| 		if Heimdall_Data.config.stinkyTracker.debug then | 		if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 			print(string.format("[%s] Stinky is now tracked: %s (%s)", ModuleName, stinky.name, stinky.class)) | 			print(string.format("[%s] Stinky is now tracked: %s (%s)", ModuleName, stinky.name, stinky.class)) | ||||||
| 			shared.dumpTable(shared.stinkyTracker.stinkies:get()) | 			shared.dump(shared.stinkyTracker.stinkies:get()) | ||||||
| 			shared.dumpTable(shared.stinkyTracker.ignored:get()) | 			shared.dump(shared.stinkyTracker.ignored:get()) | ||||||
| 		end | 		end | ||||||
| 		return true | 		return true | ||||||
| 	end, | 	end, | ||||||
| @@ -66,8 +66,8 @@ shared.StinkyTracker = { | |||||||
| 		shared.stinkyTracker.stinkies[name] = nil | 		shared.stinkyTracker.stinkies[name] = nil | ||||||
| 		if Heimdall_Data.config.stinkyTracker.debug then | 		if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 			print(string.format("[%s] Stinky is now ignored: %s", ModuleName, name)) | 			print(string.format("[%s] Stinky is now ignored: %s", ModuleName, name)) | ||||||
| 			shared.dumpTable(shared.stinkyTracker.ignored:get()) | 			shared.dump(shared.stinkyTracker.ignored:get()) | ||||||
| 			shared.dumpTable(shared.stinkyTracker.stinkies:get()) | 			shared.dump(shared.stinkyTracker.stinkies:get()) | ||||||
| 		end | 		end | ||||||
| 	end, | 	end, | ||||||
|  |  | ||||||
| @@ -125,7 +125,7 @@ shared.StinkyTracker = { | |||||||
| 							date("%H:%M:%S", time()) | 							date("%H:%M:%S", time()) | ||||||
| 						) | 						) | ||||||
| 					) | 					) | ||||||
| 					shared.dumpTable(stinkies) | 					shared.dump(stinkies) | ||||||
| 				end | 				end | ||||||
| 			end | 			end | ||||||
| 			return stinkies | 			return stinkies | ||||||
| @@ -164,7 +164,7 @@ shared.StinkyTracker = { | |||||||
| 						date("%H:%M:%S", time()) | 						date("%H:%M:%S", time()) | ||||||
| 					) | 					) | ||||||
| 				) | 				) | ||||||
| 				shared.dumpTable(stinkies) | 				shared.dump(stinkies) | ||||||
| 			end | 			end | ||||||
| 			return stinkies | 			return stinkies | ||||||
| 		end | 		end | ||||||
| @@ -197,7 +197,7 @@ shared.StinkyTracker = { | |||||||
| 			stinkies[name] = stinky | 			stinkies[name] = stinky | ||||||
| 			if Heimdall_Data.config.stinkyTracker.debug then | 			if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 				print(string.format("%s: Found stinky in arrived: %s/%s", ModuleName, name, class)) | 				print(string.format("%s: Found stinky in arrived: %s/%s", ModuleName, name, class)) | ||||||
| 				shared.dumpTable(stinkies) | 				shared.dump(stinkies) | ||||||
| 			end | 			end | ||||||
| 			return stinkies | 			return stinkies | ||||||
| 		end | 		end | ||||||
| @@ -231,7 +231,7 @@ shared.StinkyTracker = { | |||||||
| 			end | 			end | ||||||
| 			if Heimdall_Data.config.stinkyTracker.debug then | 			if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | 				print(string.format("[%s] Processing message from master channel: %s", ModuleName, sender)) | ||||||
| 				shared.dumpTable(Heimdall_Data.config.stinkyTracker) | 				shared.dump(Heimdall_Data.config.stinkyTracker) | ||||||
| 			end | 			end | ||||||
|  |  | ||||||
| 			local stinkies = {} | 			local stinkies = {} | ||||||
| @@ -242,7 +242,7 @@ shared.StinkyTracker = { | |||||||
| 				local whoStinkies = ParseWho(msg) | 				local whoStinkies = ParseWho(msg) | ||||||
| 				if Heimdall_Data.config.stinkyTracker.debug then | 				if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 					print(string.format("[%s] Found stinkies in WHO message", ModuleName)) | 					print(string.format("[%s] Found stinkies in WHO message", ModuleName)) | ||||||
| 					shared.dumpTable(whoStinkies) | 					shared.dump(whoStinkies) | ||||||
| 				end | 				end | ||||||
| 				for name, stinky in pairs(whoStinkies) do | 				for name, stinky in pairs(whoStinkies) do | ||||||
| 					stinkies[name] = stinky | 					stinkies[name] = stinky | ||||||
| @@ -255,7 +255,7 @@ shared.StinkyTracker = { | |||||||
| 				local seeStinkies = ParseSee(msg) | 				local seeStinkies = ParseSee(msg) | ||||||
| 				if Heimdall_Data.config.stinkyTracker.debug then | 				if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 					print(string.format("[%s] Found stinkies in SEE message", ModuleName)) | 					print(string.format("[%s] Found stinkies in SEE message", ModuleName)) | ||||||
| 					shared.dumpTable(seeStinkies) | 					shared.dump(seeStinkies) | ||||||
| 				end | 				end | ||||||
| 				for name, stinky in pairs(seeStinkies) do | 				for name, stinky in pairs(seeStinkies) do | ||||||
| 					stinkies[name] = stinky | 					stinkies[name] = stinky | ||||||
| @@ -268,7 +268,7 @@ shared.StinkyTracker = { | |||||||
| 				local arrivedStinkies = ParseArrived(msg) | 				local arrivedStinkies = ParseArrived(msg) | ||||||
| 				if Heimdall_Data.config.stinkyTracker.debug then | 				if Heimdall_Data.config.stinkyTracker.debug then | ||||||
| 					print(string.format("[%s] Found stinkies in ARRIVED message", ModuleName)) | 					print(string.format("[%s] Found stinkies in ARRIVED message", ModuleName)) | ||||||
| 					shared.dumpTable(arrivedStinkies) | 					shared.dump(arrivedStinkies) | ||||||
| 				end | 				end | ||||||
| 				for name, stinky in pairs(arrivedStinkies) do | 				for name, stinky in pairs(arrivedStinkies) do | ||||||
| 					stinkies[name] = stinky | 					stinkies[name] = stinky | ||||||
|   | |||||||
| @@ -176,7 +176,7 @@ shared.Whoer = { | |||||||
| 				if Heimdall_Data.config.who.debug then | 				if Heimdall_Data.config.who.debug then | ||||||
| 					print(string.format("[%s] WHO query: %s with %d filters", ModuleName, queryParts[1], #filters)) | 					print(string.format("[%s] WHO query: %s with %d filters", ModuleName, queryParts[1], #filters)) | ||||||
| 				end | 				end | ||||||
| 				shared.dumpTable(filters) | 				shared.dump(filters) | ||||||
| 				return WHOQuery.new(queryParts[1], filters) | 				return WHOQuery.new(queryParts[1], filters) | ||||||
| 			end, | 			end, | ||||||
| 			---@param queryStr string | 			---@param queryStr string | ||||||
| @@ -321,7 +321,7 @@ shared.Whoer = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.who.debug then | 				if Heimdall_Data.config.who.debug then | ||||||
| 					print(string.format("[%s] Queuing channel notification", ModuleName)) | 					print(string.format("[%s] Queuing channel notification", ModuleName)) | ||||||
| 					shared.dumpTable(msg) | 					shared.dump(msg) | ||||||
| 				end | 				end | ||||||
| 				table.insert(shared.networkMessenger.queue, msg) | 				table.insert(shared.networkMessenger.queue, msg) | ||||||
| 			end | 			end | ||||||
| @@ -380,7 +380,7 @@ shared.Whoer = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.who.debug then | 				if Heimdall_Data.config.who.debug then | ||||||
| 					print(string.format("[%s] Queuing channel notification", ModuleName)) | 					print(string.format("[%s] Queuing channel notification", ModuleName)) | ||||||
| 					shared.dumpTable(msg) | 					shared.dump(msg) | ||||||
| 				end | 				end | ||||||
| 				table.insert(shared.networkMessenger.queue, msg) | 				table.insert(shared.networkMessenger.queue, msg) | ||||||
| 			end | 			end | ||||||
| @@ -431,7 +431,7 @@ shared.Whoer = { | |||||||
| 				} | 				} | ||||||
| 				if Heimdall_Data.config.who.debug then | 				if Heimdall_Data.config.who.debug then | ||||||
| 					print(string.format("[%s] Queuing channel notification", ModuleName)) | 					print(string.format("[%s] Queuing channel notification", ModuleName)) | ||||||
| 					shared.dumpTable(msg) | 					shared.dump(msg) | ||||||
| 				end | 				end | ||||||
| 				--table.insert(shared.messenger.queue, msg) | 				--table.insert(shared.messenger.queue, msg) | ||||||
| 				table.insert(shared.networkMessenger.queue, msg) | 				table.insert(shared.networkMessenger.queue, msg) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user