2.2.3.2:
Bugfix für AFK (kritisch)
This commit is contained in:
parent
200ae9ace7
commit
b235b95757
@ -5,7 +5,7 @@ local bindings -- Load Telegram bindings.
|
|||||||
local utilities -- Load miscellaneous and cross-plugin functions.
|
local utilities -- Load miscellaneous and cross-plugin functions.
|
||||||
local redis = (loadfile "./otouto/redis.lua")()
|
local redis = (loadfile "./otouto/redis.lua")()
|
||||||
|
|
||||||
bot.version = '2.2.3.1'
|
bot.version = '2.2.3.2'
|
||||||
|
|
||||||
function bot:init(config) -- The function run when the bot is started or reloaded.
|
function bot:init(config) -- The function run when the bot is started or reloaded.
|
||||||
|
|
||||||
|
@ -80,8 +80,7 @@ function afk:pre_process(msg, self)
|
|||||||
local timestamp = redis:hget(hash, 'time')
|
local timestamp = redis:hget(hash, 'time')
|
||||||
local current_timestamp = msg.date
|
local current_timestamp = msg.date
|
||||||
local afk_time = current_timestamp - timestamp
|
local afk_time = current_timestamp - timestamp
|
||||||
local seconds = afk_time % 60
|
local duration = makeHumanTime(afk_time)
|
||||||
local duration = makeHumanTime(seconds)
|
|
||||||
|
|
||||||
redis:hset(hash, 'afk', false)
|
redis:hset(hash, 'afk', false)
|
||||||
if afk_text then
|
if afk_text then
|
||||||
|
Reference in New Issue
Block a user