PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: Jaakko on 27 June, 2006, 10:11:38

Title: Simple $MyInfo log
Post by: Jaakko on 27 June, 2006, 10:11:38
I need to log all entering users $MyInfo for 24h. The script only needs to write them in to a .txt file.
I don't care how large the log will be because the script is for temporary use only.
Title: Re: Simple $MyInfo log
Post by: zero-cool on 27 June, 2006, 10:50:27
Hi,

--[[
$MyINFO log
Made by zero-cool
Request by Jaakko
]]--

file = "myinfo_log.txt"
time = 5 -- time to save all $MyINFO in minutes (1440 minutes = 1 day (24 hours))

function Main()
sTmp = ""
sec = 1000
min = sec*60
SetTimer(time*min)
StartTimer()
end

function MyINFOArrival(user, data)
sTmp = sTmp..data.."\n"
end

function OnTimer()
local handle = io.open(file,"a+") 
    handle:write(sTmp) 
handle:flush() 
    handle:close()
    sTmp = ""
end


Regards,
Title: Re: Simple $MyInfo log
Post by: Thor on 27 June, 2006, 14:15:12
Why don't you use UserBekcisi (http://ptxscriptdb.psycho-chihuahua.net/download.php?list.74)? This will save all information about users what you need (or more :D)
Title: Re: Simple $MyInfo log
Post by: 6Marilyn6Manson6 on 27 June, 2006, 15:30:36
Quote from: Hungarista on 27 June, 2006, 14:15:12
Why don't you use UserBekcisi (http://ptxscriptdb.psycho-chihuahua.net/download.php?list.74)? This will save all information about users what you need (or more :D)

Because he want save only $MyINFO and not all information ;)