Bugfix für handle_exception() und Crons

This commit is contained in:
Andreas Bielawski
2016-08-24 15:54:16 +02:00
parent fb9d3652f3
commit 49dd18ce3f
2 changed files with 16 additions and 10 deletions

View File

@ -221,9 +221,9 @@ function bot:run(config)
for n=1, #self.plugins do
local v = self.plugins[n]
if v.cron then -- Call each plugin's cron function, if it has one.
local result, err = pcall(function() v.cron(config) end)
local result, err = pcall(function() v.cron(self, config) end)
if not result then
utilities.handle_exception(err, 'CRON: ' .. n, config.log_chat)
utilities.handle_exception(self, err, 'CRON: ' .. n, config.log_chat)
end
end
end