Skip to content
Snippets Groups Projects
Commit 8d4fe378 authored by dg's avatar dg
Browse files

When your name is mentioned in the chat it is highlighted

git-svn-id: http://svn.net-core.org/repos/t-engine4@6271 51575b47-30f0-44d4-a5cc-537603b46e54
parent c81f0885
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,13 @@ function _M:event(e)
elseif e.donator == "recurring" then color = colors.ROYAL_BLUE end
self.channels[e.channel] = self.channels[e.channel] or {users={}, log={}}
if profile.auth and profile.auth.name then
local tokens = e.msg:split(" ")
for i = 1, #tokens do
if tokens[i]:lower() == profile.auth.name:lower() then tokens[i] = "#YELLOW#"..tokens[i].."#LAST#" end
end
e.msg = table.concat(tokens, " ")
end
self:addMessage("talk", e.channel, e.login, {e.name, color}, e.msg)
if type(game) == "table" and game.logChat and self.cur_channel == e.channel then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment