Software Freedom Law Center

Changeset 125

Show
Ignore:
Timestamp:
06/04/08 13:01:56 (3 months ago)
Author:
landon
Message:

Added some basic structure to tracker.py

Files:

Legend:

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

    r124 r125  
    33from gozerbot.generic import waitforuser 
    44from gozerbot.commands import cmnds 
    5 from gozerbot.users import users 
    6 from gozerbot.plughelp import plughelp 
    75from gozerbot.callbacks import callbacks 
    86 
    9 plughelp.add('convo', 'Test conversation script') 
     7def init(): 
     8    # Add a callback so messages of the form Start Time will work 
     9    callbacks.add("PRIVMSG", indirect_convo, threaded=True) 
     10    return 1 
    1011 
    11 def __init__(): 
    12     callbacks.add("PRIVMSG", indirect_convo, threaded=True) 
    13  
     12cmnds.add('time', start_convo, 'USER') 
    1413 
    1514def start_convo(bot, ievent): 
     15    print ievent 
     16    print "DIRECT" 
    1617 
    1718def indirect_convo(bot, ievent): 
     19    print ievent 
     20    print "INDIRECT" 
    1821 
    19  
    20 cmnds.add('convo', start_convo, 'USER') 
     22def time_handler(bot, ievent): 
     23    # Ideally *_convo functions lead here transparently 

SFLC Main Page

[frdm] Support SFLC