From 91edf21fcfc4768370ff7af760366c19ea7da40c Mon Sep 17 00:00:00 2001 From: Akamaru Date: Thu, 25 Jun 2015 22:08:20 +0200 Subject: [PATCH] gsub and other things --- plugins/url_title.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/url_title.lua b/plugins/url_title.lua index 648fe47..f8775d5 100644 --- a/plugins/url_title.lua +++ b/plugins/url_title.lua @@ -14,6 +14,7 @@ function getTitle(page) s = string.gsub(s, "&", "&") s = string.gsub(s, "'", "'") s = string.gsub(s, "–", "–") + s = string.gsub(s, "»", "»") -- Put all the tags in lowercase. s = string.gsub(s, "(<[^ >]+)", string.lower) @@ -49,16 +50,16 @@ function run(msg, matches) string.match(msg.text, "twitch.tv") or string.match(msg.text, "steamcommunity.com/app/") or string.match(msg.text, "deviantart.com") then - print('Invalide, da "'..title..'"') + print('Nicht gültig, da "'..title..'"') else return title end end return { - description = "Postet URL-Titel", - usage = {"Irgendein Link"}, - patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$",}, + description = "Postet den URL-Titel", + usage = {""}, + patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$"}, run = run } end \ No newline at end of file