Skip to content
Snippets Groups Projects
Commit 864da15c authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@2776 51575b47-30f0-44d4-a5cc-537603b46e54
parent d3657016
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,13 @@ end
function _M:event(e)
if e.se == "Talk" then
e.msg = e.msg:removeColorCodes()
self.channels[e.channel] = self.channels[e.channel] or {users={}, log={}}
local log = self.channels[e.channel].log
table.insert(log, 1, ("<%s> %s"):format(e.user, e.msg))
while #log > 50 do table.remove(log) end
game.log("#YELLOW#"..log[1])
_G.game.log("#YELLOW#"..log[1])
elseif e.se == "Join" then
self.channels[e.channel] = self.channels[e.channel] or {users={}, log={}}
self.channels[e.channel].users[e.user] = true
......@@ -60,6 +62,7 @@ end
function _M:talk(msg)
if not msg then return end
msg = msg:removeColorCodes()
core.profile.pushOrder(string.format("o='ChatTalk' channel=%q msg=%q", self.cur_channel, msg))
end
......
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