EC: spoofed spell casting overhead text.

ForeverFunForeverFun Posts: 920
edited May 2023 in Bugs
This thread makes a good point about the limited behavior of the filtering logic, and the linked part of the post points out a different way to handle the filtering.

While looking at that, I noticed the EC will color code and expand "fake" spell casting overhead text, making that appear the user is casting those spells.  In addition, that "fake" text would slip through the down-stream filtering above.

Reproduce as so, in EC:
  1. User Settings->Overhead Text->Overhead Chat (enabled)
  2. User Settings->Overhead Text->Disable Overhead Spellcasting Text (unchecked)
  3. User Settings->Overhead Text->Show Spell Names (checked).
  4. Issue a say in the chat window Uus Jux  (case sensitive, no leading or trailing text)
  5. Observe the text gets color coded, with [spellname] added.
#4 can be done by the same player using EC, or another player on screen.

Below change doesn't color code, expand spell names, or show the "fake" versions of spellcasting text overhead.
(*) currently, this change does not drop variations of spoofed spell text, things like leading or trailing spaces, mis-matched case, etc;  I have not tested this exhaustively either

Below can be combined with the down-stream filtering logic linked above so that if a player is filtered, the only overhead text you see is actual spell casting.

Change to textparsing.lua, TextParsing.ColorizeText(), commented out the existing 3 lines.

	--if SpellsInfo.SpellsData[tostring(senderText)] then
-- return SpellsInfo.SpellsData[tostring(senderText)].color, channel
--end


if SpellsInfo.SpellsData[tostring(senderText)] then
if(type(color) == "table") then
return SpellsInfo.SpellsData[tostring(senderText)].color, channel
end

SystemData.Text = L"" -- stomp the "fake" spellcasting text. can delete this line if you plan to filter the text down stream, based on type(color)
return color, channel -- propagate "original" color type, for filtering purposes, rather than always over-writing from SpellsData table.
end

Sign In or Register to comment.