added temp, volt and takt to sh.lua

This commit is contained in:
Akamaru 2015-06-10 14:28:44 +02:00
parent 0fab7d8ad7
commit bb3463de47
1 changed files with 19 additions and 1 deletions

View File

@ -20,12 +20,30 @@ function run(msg, matches)
return
end
if string.starts(msg.text, '/temp') then
text = run_bash('vcgencmd measure_temp')
send_msg(receiver, text, ok_cb, false)
return
end
if string.starts(msg.text, '/volt') then
text = run_bash('vcgencmd measure_volts')
send_msg(receiver, text, ok_cb, false)
return
end
if string.starts(msg.text, '/takt') then
text = run_bash('vcgencmd measure_clock arm')
send_msg(receiver, text, ok_cb, false)
return
end
end
return {
description = "Führt Befehle in der Konsole aus",
usage = {"/sh kann nur Akamaru"},
patterns = {"^/uptime", "^/sh (.*)$"},
patterns = {"^/uptime", "^/sh (.*)$","^/temp$","^/volt$","^/takt$"},
run = run,
privileged = true
}