gsub and other things
This commit is contained in:
parent
5937e58687
commit
91edf21fcf
@ -14,6 +14,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, "»", "»")
|
||||||
|
|
||||||
-- Put all the tags in lowercase.
|
-- Put all the tags in lowercase.
|
||||||
s = string.gsub(s, "(<[^ >]+)", string.lower)
|
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, "twitch.tv") or
|
||||||
string.match(msg.text, "steamcommunity.com/app/") or
|
string.match(msg.text, "steamcommunity.com/app/") or
|
||||||
string.match(msg.text, "deviantart.com") then
|
string.match(msg.text, "deviantart.com") then
|
||||||
print('Invalide, da "'..title..'"')
|
print('Nicht gültig, da "'..title..'"')
|
||||||
else
|
else
|
||||||
return title
|
return title
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description = "Postet URL-Titel",
|
description = "Postet den URL-Titel",
|
||||||
usage = {"Irgendein Link"},
|
usage = {""},
|
||||||
patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$",},
|
patterns = {"^(https?://[%w-_%.%?%.:,/%+=&#!]+)$"},
|
||||||
run = run
|
run = run
|
||||||
}
|
}
|
||||||
end
|
end
|
Reference in New Issue
Block a user