View Single Post
Old 2008-03-26, 03:34   #6
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by IronBits View Post
This is what I use on the Server.
Code:
function OnPrime(t, k, n, job)
   local fileprime = openfile("primes.txt", "a")
   if fileprime then
      write(fileprime, format("[%s]\n", job.resultdate))
      write(fileprime, format(displayFormat.." is prime!  Time : %d.0 sec.\n",
                  k, n,
                  Seconds() - job.seconds))
      closefile(fileprime)
   end
end
Hmm. Though I don't know squat about the LUA programming language, it looks like the OnPrime function isn't even being fed the username--so it might be technically impossible to have it output the user for each prime without actually modifying the one of the .lua files (rather than just using the built in OnPrime function thing in the llr-serverconfig.txt file).
mdettweiler is offline   Reply With Quote