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

View File

@ -20,12 +20,30 @@ function run(msg, matches)
return return
end 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 end
return { return {
description = "Führt Befehle in der Konsole aus", description = "Führt Befehle in der Konsole aus",
usage = {"/sh kann nur Akamaru"}, usage = {"/sh kann nur Akamaru"},
patterns = {"^/uptime", "^/sh (.*)$"}, patterns = {"^/uptime", "^/sh (.*)$","^/temp$","^/volt$","^/takt$"},
run = run, run = run,
privileged = true privileged = true
} }