status function to lua
Merge github.com:vysheng/tg