-- A simple logon logger by piglja - 25/04/03 -- Updated and modifyed a bit by piglja - 28/04/03 -- A bug by piglja fixed by piglja;P - 28/04/03 -- An update that Ops are logged too and disconnect are logged by piglja - 28/04/03 file_logon = "logon.txt" function NewUserConnected(user) description,speed,email,share=MyInfoString(user.sMyInfoString) local share2 = share / (1024*1024*1024) ip = user.sIP appendto(file_logon) write("-->> "..user.sName..","..date("%d").."."..date("%m").."."..date("%y").." - "..date("%H")..":"..date("%M").." - with:"..speed.." IP "..ip..", e-mail "..email.." with "..share2.."Gb \r\n") writeto() end function OpConnected(user) description,speed,email,share=MyInfoString(user.sMyInfoString) local share2 = share / (1024*1024*1024) ip = user.sIP appendto(file_logon) write("-->> "..user.sName..","..date("%d").."."..date("%m").."."..date("%y").." - "..date("%H")..":"..date("%M").." - with:"..speed.." IP "..ip..", e-mail "..email.." with "..share2.."Gb \r\n") writeto() end function UserDisconnected(user) description,speed,email,share=MyInfoString(user.sMyInfoString) local share2 = share / (1024*1024*1024) ip = user.sIP appendto(file_logon) write("<<-- "..user.sName..","..date("%d").."."..date("%m").."."..date("%y").." - "..date("%H")..":"..date("%M").." - with:"..speed.." IP "..ip..", e-mail "..email.." with "..share2.."Gb \r\n") writeto() end function OpDisconnected(user) description,speed,email,share=MyInfoString(user.sMyInfoString) local share2 = share / (1024*1024*1024) ip = user.sIP appendto(file_logon) write("<<-- "..user.sName..","..date("%d").."."..date("%m").."."..date("%y").." - "..date("%H")..":"..date("%M").." - with:"..speed.." IP "..ip..", e-mail "..email.." with "..share2.."Gb \r\n") writeto() end function MyInfoString(data) s,e,description,speed,email,share = strfind(data, "$MyINFO $ALL ([^$]+)$ $([^$]*)$([^$]*)$([^$]+)") if speed~=nil then speed = strsub(speed,1,strlen(speed)-1) end return description,speed,email,share end