diff --git a/plugins/pluginsold/expand.lua b/plugins/pluginsold/expand.lua deleted file mode 100644 index 2986672..0000000 --- a/plugins/pluginsold/expand.lua +++ /dev/null @@ -1,26 +0,0 @@ -local function run(msg, patterns) - local response_body = {} - local request_constructor = { - url = patterns[1], - method = "HEAD", - sink = ltn12.sink.table(response_body), - headers = {}, - redirect = false - } - - local ok, response_code, response_headers, response_status_line = http.request(request_constructor) - if ok and response_headers.location then - return " ๐Ÿ‘ " .. response_headers.location - else - return "Can't expand the url." - end -end - -return { - description = "Expand a shortened URL to the original one.", - usage = "!expand [url]: Return the original URL", - patterns = { - "^!expand (https?://[%w-_%.%?%.:/%+=&]+)$" - }, - run = run -} diff --git a/plugins/url_title.lua b/plugins/url_title.lua index c76bc46..a9b694c 100644 --- a/plugins/url_title.lua +++ b/plugins/url_title.lua @@ -15,6 +15,7 @@ function getTitle(page) s = string.gsub(s, ">", ">") s = string.gsub(s, "&", "&") s = string.gsub(s, "'", "'") + s = string.gsub(s, "’", "'") s = string.gsub(s, "–", "โ€“") s = string.gsub(s, "»", "ยป") s = string.gsub(s, "–", "โ€“") @@ -64,6 +65,7 @@ function run(msg, matches) title == "Moved Permanently" or title == "Redirection" or title == "Object moved" or + title == "Error 404 (Not Found)!!1" or string.match(title, "on Steam") or string.match(title, "521: Web server is down") or string.match(title, "eBay") or