From 124db26473e8842c6653db59615da59db4fe7d06 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Mon, 27 Jul 2015 18:35:20 +0200 Subject: [PATCH] fuck this fucking afk shit plugin fuck --- plugins/afk.lua | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/plugins/afk.lua b/plugins/afk.lua index decc19d..7f4263a 100644 --- a/plugins/afk.lua +++ b/plugins/afk.lua @@ -1,29 +1,23 @@ function run(msg, matches) - --local text = matches[2] + local text = matches[2] local user_name = get_name(msg) - --[[if matches[1] == '/afk' and matches[2] then - return user_name .. ' ist nun AFK (' .. text .. ')' + if string.starts(msg.text, '/afk') and (text == nil) then + return user_name .. ' ist nun AFK' else - return user_name .. ' ist nun AFK' - end]] - - if string.starts(msg.text, '/afk') then - return user_name .. ' ist nun AFK' - --elseif string.starts(msg.text, '/afk') and text == not nil then - --return user_name .. ' ist nun AFK (' .. text .. ')' + return user_name .. ' ist nun AFK (' .. text .. ')' end - if string.starts(msg.text, '/re') or string.starts(msg.text, '/wd') then + --[[if string.starts(msg.text, '/re') or string.starts(msg.text, '/wd') then return user_name .. ' ist wieder da!' - end + 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]$'}, + 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] \ No newline at end of file