Software Freedom Law Center

Changeset 140

Show
Ignore:
Timestamp:
06/07/08 16:41:37 (2 months ago)
Author:
landon
Message:

Moved None checking to tracker.py and added a retry mechanism to username
authentication in auth.py

Files:

Legend:

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

    r139 r140  
    33def authenticate_name(bot, ievent): 
    44    """ Not authentication, just checks that the name exists """ 
    5     bot.say("Landon","Username?",how='msg',fromm="fromme",who="me!"
     5    bot.say("Landon","Username?",how='msg'
    66    #rlog(99,"Debug","Testing for auth reload") 
    77    username = waitforuser(bot, ievent.userhost, 30) 
    88    if (username == None): 
    9         ievent.reply("I'm sorry Dave, I'm afraid you gave me a NoneType") 
    10     return username.txt 
     9        bot.say("Landon","You have failed to provide a username, do you want to try again? (y/n)") 
     10        response = waitforuser(bot, ievent.userhost, 10) 
     11        if (not response == None): 
     12            if (response.txt == "y"): 
     13                username = authenticate_name(bot, ievent) 
     14 
     15    return username 
  • trunk/antimatter/luke/myplugs/libtracker/tracker.py

    r138 r140  
    66def start_tracker(bot, ievent): 
    77    user = auth.authenticate_name(bot, ievent) 
    8     ievent.reply(user) 
     8    if (user == None): 
     9        ievent.reply("I'm sorry Dave, I'm afraid you gave me a NoneType") 
     10        return 
     11    ievent.reply(user.txt) 
    912 
    1013cmnds.add('tracker', start_tracker, 'USER') 

SFLC Main Page

[frdm] Support SFLC