Kick all sessions having "Keep alive"
Posted: Wed Nov 30, 2016 11:11 am
Hello,
I try to Kick all Sessions having "Keep_Alive" as last remark.
The Little Lua-script works very well.
Here's my script:
local strUserlist = {}
strUserlist = c_GetConnectionsList("Domain")
for nr in pairs(strUserlist) do
local letztes = strUserlist[nr].lastcommand
local user = strUserlist[nr].username
if string.find(letztes, 'KEEP ALIVE') then
c_KickSession('Domain',strUserlist[nr].id,0,0,0,0,0,0)
end
end
But I recognized, that WingFTP remarks "Keep alive" for users who's uploads are in still in progress. So the script kicks sessions that shouldn't be "kicked".
Now I tried to use "%ConTransferByte" but I got no values back from the System.
Perhaps someone can help to solve my problem, getting the information, if there is any process (upload/download) in progress.
Thx
Meik
I try to Kick all Sessions having "Keep_Alive" as last remark.
The Little Lua-script works very well.
Here's my script:
local strUserlist = {}
strUserlist = c_GetConnectionsList("Domain")
for nr in pairs(strUserlist) do
local letztes = strUserlist[nr].lastcommand
local user = strUserlist[nr].username
if string.find(letztes, 'KEEP ALIVE') then
c_KickSession('Domain',strUserlist[nr].id,0,0,0,0,0,0)
end
end
But I recognized, that WingFTP remarks "Keep alive" for users who's uploads are in still in progress. So the script kicks sessions that shouldn't be "kicked".
Now I tried to use "%ConTransferByte" but I got no values back from the System.
Perhaps someone can help to solve my problem, getting the information, if there is any process (upload/download) in progress.
Thx
Meik