Stats only for chats

This commit is contained in:
yago 2015-04-11 19:27:09 +02:00
parent 5cc95b6ee4
commit 68050fe52a

View File

@ -90,10 +90,13 @@ local function get_stats_status( msg )
end
local function run(msg, matches)
if matches[1] == "stats" then -- Hack
return get_stats_status(msg)
if matches[1] == "stats" then
if msg.to.type == 'chat' then
return get_stats_status(msg)
else
return 'Stats works only chats'
end
else
print ("update stats")
update_user_stats(msg)
save_stats()
end