#traffic Befehl hinzugefügt

This commit is contained in:
Akamaru 2016-08-01 21:12:33 +02:00
parent 2334a40638
commit f1e1900a06
1 changed files with 8 additions and 2 deletions

View File

@ -39,7 +39,6 @@ local function run(msg, matches)
if string.match(msg.text, '^#[Ss][Cc][Rr][Ee][Ee][Nn]$') then
text = run_bash("scrot 'scrot.png' -e 'mv $f ~/Mikubot/tmp/'")
send_photo(get_receiver(msg), "tmp/scrot.png", ok_cb, false)
return 'Screenshot wird gesendet!'
end
-- Requires fswebcam (sudo apt-get install fswebcam)
@ -53,6 +52,12 @@ local function run(msg, matches)
text = 'Es gibt '..string.match(cmd, '(%d+) aktualisiert')..' Updates'
return text
end
-- Requires vnstat & vnstati (sudo apt-get install vnstat vnstati)
if string.match(msg.text, '^#[Tt][Rr][Aa][Ff][Ff][Ii][Cc]$') then
text = run_bash("vnstati -m -vs -i enp2s0 -o tmp/vnstat.png")
send_photo(get_receiver(msg), "tmp/vnstat.png", ok_cb, false)
end
end
@ -63,7 +68,8 @@ return {
"^#[Uu][Pp][Tt][Ii][Mm][Ee]$",
"^#[Ss][Cc][Rr][Ee][Ee][Nn]$",
"^#[Cc][Hh][Ee][Cc][Kk]$",
"^#[Ww][Ee][Bb][Cc][Aa][Mm]$"
"^#[Ww][Ee][Bb][Cc][Aa][Mm]$",
"^#[Tt][Rr][Aa][Ff][Ff][Ii][Cc]$"
},
run = run,
privileged = true