Would be nice if there was an event handler that is called every time a message is sent through chat log.
Just to make what I am looking for clear, I added some jibberish code that doesn't exist. But you should be able to see what I am looking for.
Is there something similar or along these lines that exists?
Just to make what I am looking for clear, I added some jibberish code that doesn't exist. But you should be able to see what I am looking for.
PHP Code:
function OnChatHandler( Event )
local text = Event.message
-- source of text from event (linkshell/fc/say/battle/etc..)
local source = Event.source
if (text)
-- do some stuff
-- do more stuff
local reply = "" -- reply to event goes here
-- send to party chat
Chat:Send("/p " .. reply)
end
end
RegisterEventHandler("Chat.Update", OnChatHandler)
Is there something similar or along these lines that exists?