AFK Plugin nun mit Zeitangabe

This commit is contained in:
2016-01-11 19:38:03 +01:00
parent af4d3fcba7
commit 1031849145
4 changed files with 34 additions and 6 deletions

View File

@ -107,6 +107,7 @@ end
-- Apply plugin.pre_process function
function pre_process_msg(msg)
--for name,plugin in orderedPairs(plugins) do
for name,plugin in pairs(plugins) do
if plugin.pre_process and msg then
-- print('Preprocess', name)

View File

@ -661,4 +661,10 @@ function cache_data(plugin, query, data, timeout, typ)
redis:hmset(hash, data)
end
redis:expire(hash, timeout)
end
function orderedPairs(t)
-- Equivalent of the pairs() function on tables. Allows to iterate
-- in order
return orderedNext, t, nil
end