# HG changeset patch # User Kim Alvefur # Date 1527721401 -7200 # Node ID 7ab07818658787cd949f1eaaa01f79f712737f18 # Parent e545ba65c9ef4ec26c10096d597b64d1e419e8f3 plugins.issues: Avoid triggering on #number at the end of a word (eg URLs) diff -r e545ba65c9ef -r 7ab078186587 plugins/issues.lua --- a/plugins/issues.lua Thu May 31 00:59:20 2018 +0200 +++ b/plugins/issues.lua Thu May 31 01:03:21 2018 +0200 @@ -53,7 +53,7 @@ end); local function check_for_issue_id(message) - local issue_id = message.body and message.body:match"#(%d+)"; + local issue_id = message.body and message.body:match"^#(%d+)" or message.body:match"%s#(%d+)"; if issue_id then return bot:event("commands/issue", { param = issue_id, reply = message.reply, room = message.room }); end