Software Freedom Law Center

Changeset 156

Show
Ignore:
Timestamp:
06/15/08 16:32:55 (4 months ago)
Author:
landon
Message:

There is now a plugin config file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/antimatter/luke/myplugs/libtracker/auth.py

    r153 r156  
    55from gozerbot.datadir import datadir 
    66from gozerbot.persist import Persist 
     7from gozerbot.persistconfig import PersistConfig 
    78 
    89from user import User 
    910 
    1011authenticated = Persist(datadir + '/authenticated') 
     12config = PersistConfig() 
     13 
     14if not config.has_key('max_auth'): 
     15    config.define('max_auth',86400) 
    1116 
    1217if not authenticated.data: 
     
    2126    user = check_auth(ievent) 
    2227    if (not user == None): 
    23         until = gmtime(86400 - (time() - user.lastauth)) 
     28        until = gmtime(config.get('max_auth') - (time() - user.lastauth)) 
    2429        bot.say(ievent.nick, "You're still authenticated for " + str(until[3]) + "h:" \ 
    2530        + str(until[4]) + "m:" + str(until[5]) + "s") 
  • trunk/antimatter/luke/myplugs/libtracker/tracker.py

    r153 r156  
    1111def tracker(bot, ievent): 
    1212    user = auth.check_auth(ievent) 
    13     ievent.reply("I'm watching you, " + user.name) 
    1413 
    1514def authenticate(bot, ievent): 

SFLC Main Page

[frdm] Support SFLC