Changeset 156
- Timestamp:
- 06/15/08 16:32:55 (4 months ago)
- Files:
-
- trunk/antimatter/luke/myplugs/libtracker/auth.py (modified) (2 diffs)
- trunk/antimatter/luke/myplugs/libtracker/tracker.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/antimatter/luke/myplugs/libtracker/auth.py
r153 r156 5 5 from gozerbot.datadir import datadir 6 6 from gozerbot.persist import Persist 7 from gozerbot.persistconfig import PersistConfig 7 8 8 9 from user import User 9 10 10 11 authenticated = Persist(datadir + '/authenticated') 12 config = PersistConfig() 13 14 if not config.has_key('max_auth'): 15 config.define('max_auth',86400) 11 16 12 17 if not authenticated.data: … … 21 26 user = check_auth(ievent) 22 27 if (not user == None): 23 until = gmtime( 86400- (time() - user.lastauth))28 until = gmtime(config.get('max_auth') - (time() - user.lastauth)) 24 29 bot.say(ievent.nick, "You're still authenticated for " + str(until[3]) + "h:" \ 25 30 + str(until[4]) + "m:" + str(until[5]) + "s") trunk/antimatter/luke/myplugs/libtracker/tracker.py
r153 r156 11 11 def tracker(bot, ievent): 12 12 user = auth.check_auth(ievent) 13 ievent.reply("I'm watching you, " + user.name)14 13 15 14 def authenticate(bot, ievent):