/help for user convenience

This commit is contained in:
dupie 2015-07-02 22:04:00 -04:00
parent 259aac58b1
commit 7dd198421a
2 changed files with 4 additions and 3 deletions

View File

@ -38,14 +38,14 @@ function PLUGIN.action(msg)
local jstr, res = HTTP.request(url)
if res ~= 200 then
send_msg(target, 'Connection error.', ok_cb, false)
send_msg(msg, 'Connection error.')
return
end
local jdat = JSON.decode(jstr)
if #jdat.responseData.results < 1 then
send_msg(target, 'No results found.', ok_cb, false)
send_msg(msg, 'No results found.')
return
end

View File

@ -7,7 +7,8 @@ PLUGIN.doc = [[
PLUGIN.triggers = {
'^!help',
'^!h$'
'^!h$',
'^/help'
}
function PLUGIN.action(msg)