# HG changeset patch # User Kim Alvefur # Date 1438976870 -7200 # Node ID c9da10093c51c2050106d0e2cb9b78641c93502d # Parent 5b03c71d05f0b74a56c099149e7126885f79f2a0 plugins.github: Fix syntax error and wrong name diff -r 5b03c71d05f0 -r c9da10093c51 plugins/github.lua --- a/plugins/github.lua Fri Aug 07 21:45:02 2015 +0200 +++ b/plugins/github.lua Fri Aug 07 21:47:50 2015 +0200 @@ -25,9 +25,9 @@ bot:hook("commands/issue", function (command) local issue_id = tonumber(command.param); if not issue_id then return; end - local current_conf = conf[command.room and command.room.jid or "default"]; - if not current_conf then return end - assert(http.request(issue_url(issue_id), ex, function (issue, code) + local current_conf = conf[command.room and command.room.jid] or conf; + if not current_conf.user then return end + assert(http.request(get_issue_url(issue_id), ex, function (issue, code) if code > 400 then return command:reply("HTTP Error "..code.." :("); end @@ -35,7 +35,7 @@ if not issue then return command:reply("Got invalid JSON back :("); end - command:reply(("%s #%d\n%s"):format(issue.title, issue.number issue.html_url)); + command:reply(("%s #%d\n%s"):format(issue.title, issue.number, issue.html_url)); end)); return true; end);