This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/plugins/afk.lua
2015-06-26 14:02:20 +02:00

26 lines
616 B
Lua

function run(msg, matches)
text = matches[2]
local user_name = get_name(msg)
if matches[1] == '/afk' and not text then
return user_name .. ' ist nun AFK'
end
if matches[1] == '/afk' then
return user_name .. ' ist nun AFK (' .. text .. ')'
end
if matches[1] == '/re' or '/wd' then
return user_name .. ' ist wieder da!'
end
end
return {
description = 'Sagt dass ihr afk oder wieder da seid',
usage = {'/afk','/re','/wd'},
patterns = {'^/([A|a][F|f][K|k])$','^/([A|a][F|f][K|k]) (.*)$','^/([R|r][E|e])$','^/([W|w][D|d])$'},
run = run
}
--by Akamaru [https://ponywave.de]