Log time stamp

Post new topic   Reply to topic Script Sharing View previous topic :: View next topic  
Author Message
Scotsman
Site Admin


Joined: 03 Aug 2004
Posts: 705
Location: MadWolf Software

PostPosted: Mon May 22, 2006 9:14 pm    Post subject: Log time stamp Reply with quote

Having on many occasions wished there was a time stamp in the log, made this simple little inchat routine in my cyborg to put the time in the log every 5 minutes or so, if someone talks.

Code:

import time

lastTime = 0

#----------------------------------------------------------------------------
# InChat event
#
def mnr_inchat(user, chatText):
    global lastTime

    if manor.tickcount() - lastTime >= 18000:
        lastTime = manor.tickcount()
        print "------ " + time.strftime("%a, %B %d %I:%M%p") + " ------"

    return chatText
Back to top
View user's profile Send private message Visit poster's website
LongFang



Joined: 18 Feb 2005
Posts: 124
Location: Rembert SC.

PostPosted: Tue May 23, 2006 4:13 am    Post subject: Cool TY Reply with quote

Seems to work welll as a room script to
Logs the time for all the uses
_________________
Im Not Lost. I know im on Earth

¥£ongFang »W°Ð°Ð«
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 6 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum