- Core: Nur noch ein Pattern pro Plugin wird gematcht + Pattern wird jetzt wieder angezeigt

- twitter_send: twwhitelist mit Reply (wie bei Banhammer) + Bugfixes
This commit is contained in:
Andreas Bielawski
2016-08-14 00:37:09 +02:00
parent f71cec9f54
commit 5449bd3263
2 changed files with 40 additions and 18 deletions

View File

@ -266,13 +266,17 @@ function match_plugins(self, msg, config, plugin)
-- trying to port matches to otouto
local pattern = plugin.triggers[n]
local matches = match_pattern(pattern, msg.text)
print(plugin.name..' triggered')
return plugin.action(self, msg, config, matches)
if matches then
print('msg matches: ', pattern, ' for "'..plugin.name..'"')
return plugin.action(self, msg, config, matches)
end
end)
if not success then
utilities.handle_exception(self, result, msg.from.id .. ': ' .. msg.text, config)
return
end
-- if one pattern matches, end
return
end
end
end