new plugin sleep.lua

This commit is contained in:
Akamaru 2015-08-17 02:30:34 +02:00
parent 0406f6a994
commit 371c93b3d4

25
plugins/sleep.lua Normal file
View File

@ -0,0 +1,25 @@
require "socket"
local function sleep(sec)
socket.select(nil, nil, sec)
end
local function run(msg, matches)
print('Schlafe... ')
-- Set delay in seconds (10 = 10 seconds)
local delay = 60
sleep(delay)
return 'Bin wieder da!'
end
return {
description = "Setzt den Bot in schlaf",
usage = {"/sleep"},
patterns = {"^/[Ss][Ll][Ee][Ee][Pp]$"},
run = run
}
--by Akamaru [https://ponywave.de]