From 5bf2b6bf179441105c2fdf71584376522eba06f6 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Thu, 16 Apr 2015 20:14:36 +0200 Subject: [PATCH] 9gag deletes img after sended --- plugins/9gag.lua | 2 +- plugins/img_google.lua | 3 ++- plugins/img_google_nsfw.lua | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/9gag.lua b/plugins/9gag.lua index 5f5e43b..f50384b 100644 --- a/plugins/9gag.lua +++ b/plugins/9gag.lua @@ -25,7 +25,7 @@ local function run(msg, matches) local receiver = get_receiver(msg) local url, title = get_9GAG() local file_path = download_to_file(url) - _send_photo(receiver, file_path, send_title, {receiver, title}) + send_photo_from_url(receiver, url, send_title, {receiver, title}) return false end diff --git a/plugins/img_google.lua b/plugins/img_google.lua index 365e1c6..033e995 100644 --- a/plugins/img_google.lua +++ b/plugins/img_google.lua @@ -1,3 +1,4 @@ + do function getGoogleImage(text) @@ -37,6 +38,7 @@ function run(msg, matches) print("Bilder-URL: ", url) send_photo_from_url(receiver, url) + return "Source:"..url end return { @@ -45,5 +47,4 @@ return { patterns = {"^/img (.*)$"}, run = run } - end diff --git a/plugins/img_google_nsfw.lua b/plugins/img_google_nsfw.lua index c54075d..fe24665 100644 --- a/plugins/img_google_nsfw.lua +++ b/plugins/img_google_nsfw.lua @@ -37,6 +37,7 @@ function run(msg, matches) print("Bilder-URL: ", url) send_photo_from_url(receiver, url) + return "Source: "..url end return {