View Single Post
06-16-21, 11:50 AM   #3
DarkruneDOTDK
A Murloc Raider
Join Date: Oct 2015
Posts: 9
Originally Posted by Fizzlemizz View Post
You've given no context as to the where, when and how this code is called. Makes it almost impossible to comment other than to say the first line doesn't seem to to have anything to do with the other two so maybe there is more code that is missing from your post?


Are you running any chat addons like Prat?
Ohh sorry...

The idea is that it is being run with a slash command after the addon has been loaded.
So I have added a SlashCmdHandler like this:
Code:
SLASH_DLU1 = "/dlu";
SlashCmdList.DLU = function(commandName)
	DLU:SlashCmdHandler(commandName);
end
The argument passed is then split like this:
Code:
function DLU:SlashCmdHandler(msg)
	local command, arg2, arg3 = strsplit(" ", msg);
	local arg = command:lower();
if (arg == "test") then
		Test();
	end
end
The Test method would then apply some settings (will be renamed at some point).
Right now I have just looked at the code here (line number 3209) and made a minor change (hard-coded the font size to 12).
I am however not able to call some of the methods in the file, like the ChatFrame_UpdateDefaultChatTarget(self), that I would believe would commit the update to the blizzard servers or something...

Currently I am not using any addon that would modify the chat window at all (actually not using anything that changes the original UI).

Probably also worth mentioning I am doing this in TBC Classic.

Last edited by DarkruneDOTDK : 06-16-21 at 11:52 AM.
  Reply With Quote