Etwas Markdown in shell.lua
This commit is contained in:
parent
8d134a4000
commit
1b438f0142
@ -39,9 +39,9 @@ function shell:action(msg, config, matches)
|
|||||||
|
|
||||||
if msg.text:match('^/[Uu][Pp][Tt][Ii][Mm][Ee]$') then
|
if msg.text:match('^/[Uu][Pp][Tt][Ii][Mm][Ee]$') then
|
||||||
local cmd = run_command('uptime -s && uptime -p')
|
local cmd = run_command('uptime -s && uptime -p')
|
||||||
local text1 = 'Der PC ist seit dem '..makeOurDate(string.match(cmd, '(%d+-%d+-%d+)'))..' an.'
|
local text1 = 'Der PC ist seit dem <b>'..makeOurDate(string.match(cmd, '(%d+-%d+-%d+)'))..'</b> an.'
|
||||||
local text2 = shell:transeng('Das sind '..string.match(cmd, 'up (.*)'))
|
local text2 = shell:transeng('Das sind <b>'..string.match(cmd, 'up (.*)')..'</b>')
|
||||||
utilities.send_reply(self, msg, text1..'\n'..text2)
|
utilities.send_reply(self, msg, text1..'\n'..text2, 'HTML')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -61,8 +61,8 @@ function shell:action(msg, config, matches)
|
|||||||
|
|
||||||
if msg.text:match('^/[Cc][Hh][Ee][Cc][Kk]$') then
|
if msg.text:match('^/[Cc][Hh][Ee][Cc][Kk]$') then
|
||||||
local cmd = run_command("apt --just-print upgrade")
|
local cmd = run_command("apt --just-print upgrade")
|
||||||
local text = 'Es gibt '..string.match(cmd, '(%d+) aktualisiert')..' Updates'
|
local text = 'Es gibt <b>'..string.match(cmd, '(%d+) aktualisiert')..'</b> Updates'
|
||||||
utilities.send_reply(self, msg, text)
|
utilities.send_reply(self, msg, text, 'HTML')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user