administration.lua:
1.7 update. /alist for governors+ to get list of admins. /glist for owner to get list of groups. Single-governor groups. Auto-migration through 1.8. whoami.lua: Fixed markdown support. utilities.lua: Added build_name() to concatenate first and last names easily.
This commit is contained in:
@@ -255,3 +255,21 @@ markdown_escape = function(text)
|
||||
return text
|
||||
|
||||
end
|
||||
|
||||
function string:md_escape()
|
||||
local text = self
|
||||
text = text:gsub('_', '\\_')
|
||||
text = text:gsub('%[', '\\[')
|
||||
text = text:gsub('%*', '\\*')
|
||||
text = text:gsub('`', '\\`')
|
||||
return text
|
||||
end
|
||||
|
||||
-- Just an easy way to get a user's full name.
|
||||
build_name = function(first, last)
|
||||
if last then
|
||||
return first .. ' ' .. last
|
||||
else
|
||||
return first
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user