Stats are private by Chat

This commit is contained in:
yago
2014-12-14 21:28:32 +01:00
parent fe05645a39
commit 5bbf754d73
3 changed files with 31 additions and 20 deletions

View File

@@ -8,11 +8,13 @@ function run(msg, matches)
file_users:close()
local text = ""
for id, user in pairs(_users) do
local to_id = tostring(msg.to.id)
for id, user in pairs(_users[to_id]) do
if user.last_name == nil then
text = text..user.name..": "..user.msg_num.."\n"
text = text..user.name.." ["..id.."]: "..user.msg_num.."\n"
else
text = text..user.name.." "..user.last_name..": "..user.msg_num.."\n"
text = text..user.name.." "..user.last_name.." ["..id.."]: "..user.msg_num.."\n"
end
end
return text