diff --git a/plugins/stats.lua b/plugins/stats.lua index e6d36b6..2a57d27 100644 --- a/plugins/stats.lua +++ b/plugins/stats.lua @@ -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