improved afk plugin
removed wd plugin
This commit is contained in:
parent
18f2ed8545
commit
7c62730cd4
@ -1,12 +1,25 @@
|
|||||||
function run(msg, matches)
|
function run(msg, matches)
|
||||||
|
text = matches[2]
|
||||||
local user_name = get_name(msg)
|
local user_name = get_name(msg)
|
||||||
|
|
||||||
|
if matches[1] == '/afk' and not text then
|
||||||
return user_name .. ' ist nun AFK'
|
return user_name .. ' ist nun AFK'
|
||||||
end
|
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 {
|
return {
|
||||||
description = "Sagt dass ihr afk seid",
|
description = 'Sagt dass ihr afk oder wieder da seid',
|
||||||
usage = {"/afk"},
|
usage = {'/afk','/re','/wd'},
|
||||||
patterns = {"^/afk(.*)$"},
|
patterns = {'^/([A|a][F|f][K|k])$','^/([A|a][F|f][K|k]) (.*)$','^/([R|r][E|e])$','^/([W|w][D|d])$'},
|
||||||
run = run
|
run = run
|
||||||
}
|
}
|
||||||
--by Akamaru [https://ponywave.de]
|
--by Akamaru [https://ponywave.de]
|
@ -1,12 +0,0 @@
|
|||||||
function run(msg, matches)
|
|
||||||
local user_name = get_name(msg)
|
|
||||||
return user_name .. " ist wieder da"
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
description = "Sagt dass ihr wieder da seid",
|
|
||||||
usage = {"/wd"},
|
|
||||||
patterns = {"^/[w|W][d|D]$"},
|
|
||||||
run = run
|
|
||||||
}
|
|
||||||
--by Akamaru [https://ponywave.de]
|
|
Reference in New Issue
Block a user