!stats command

This commit is contained in:
yago
2014-11-22 20:17:33 +01:00
parent e19a0b7e6b
commit a1f5c7c9fa
2 changed files with 21 additions and 8 deletions

14
plugins/stats.lua Normal file
View File

@@ -0,0 +1,14 @@
function run(msg, matches)
local text = ""
for id, user in pairs(_users) do
text = text..user.name..": "..user.msg_num.."\n"
end
return text
end
return {
description = "Numer of messages by user",
usage = "!stats",
patterns = {"^!stats"},
run = run
}