diff options
author | Alexander Harkness <bearbin@gmail.com> | 2015-05-19 19:43:19 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2015-05-19 19:43:19 +0200 |
commit | cbb425f027a7b51c4aed5d3399b26cf325c4c8ce (patch) | |
tree | 6a35f2c9c44b7d3d5142635178bf1ec9ca5e428c /MCServer/Plugins/InfoDump.lua | |
parent | Updated Core. (diff) | |
parent | Merge pull request #2057 from Seadragon91/master (diff) | |
download | cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar.gz cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar.bz2 cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar.lz cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar.xz cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.tar.zst cuberite-cbb425f027a7b51c4aed5d3399b26cf325c4c8ce.zip |
Diffstat (limited to 'MCServer/Plugins/InfoDump.lua')
-rw-r--r-- | MCServer/Plugins/InfoDump.lua | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index ab4dfd861..a715c9a18 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -65,8 +65,12 @@ local function ForumizeString(a_Str) a_Str = a_Str:gsub("{%%p}", "\n\n") a_Str = a_Str:gsub("{%%b}", "[b]"):gsub("{%%/b}", "[/b]") a_Str = a_Str:gsub("{%%i}", "[i]"):gsub("{%%/i}", "[/i]") - a_Str = a_Str:gsub("{%%list}", "[list]"):gsub("{%%/list}", "[/list]") - a_Str = a_Str:gsub("{%%li}", "[*]"):gsub("{%%/li}", "") + a_Str = a_Str:gsub("{%%list}", "\n[list]"):gsub("{%%/list}", "[/list]") + a_Str = a_Str:gsub("{%%li}", "\n[*]"):gsub("{%%/li}", "\n") + + -- Process links: {%a LinkDestination}LinkText{%/a} + a_Str = a_Str:gsub("{%%a%s([^}]*)}([^{]*){%%/a}", "[url=%1]%2[/url]") + -- TODO: Other formatting return a_Str @@ -106,8 +110,12 @@ local function GithubizeString(a_Str) a_Str = a_Str:gsub("{%%p}", "\n\n") a_Str = a_Str:gsub("{%%b}", "**"):gsub("{%%/b}", "**") a_Str = a_Str:gsub("{%%i}", "*"):gsub("{%%/i}", "*") - a_Str = a_Str:gsub("{%%list}", ""):gsub("{%%/list}", "") - a_Str = a_Str:gsub("{%%li}", " - "):gsub("{%%/li}", "") + a_Str = a_Str:gsub("{%%list}", "\n"):gsub("{%%/list}", "\n") + a_Str = a_Str:gsub("{%%li}", "\n - "):gsub("{%%/li}", "") + + -- Process links: {%a LinkDestination}LinkText{%/a} + a_Str = a_Str:gsub("{%%a%s([^}]*)}([^{]*){%%/a}", "[%2](%1)") + -- TODO: Other formatting return a_Str @@ -592,7 +600,10 @@ local function DumpPluginInfoForum(a_PluginFolder, a_PluginInfo) DumpCommandsForum(a_PluginInfo, f) DumpPermissionsForum(a_PluginInfo, f) if (a_PluginInfo.SourceLocation ~= nil) then - f:write("[b][color=blue]Source:[/color] [url=", a_PluginInfo.SourceLocation, "]Link[/url][/b]") + f:write("\n[b]Source[/b]: ", a_PluginInfo.SourceLocation, "\n") + end + if (a_PluginInfo.DownloadLocation ~= nil) then + f:write("[b]Download[/b]: ", a_PluginInfo.DownloadLocation) end f:close() return true |