Help on module RBhandler: NAME RBhandler FILE ~\rbhandler.py DESCRIPTION RBhandler.py (C)2008 Don A. Hanlen I make no claims, and take no reponsibility, for use or abuse of this code! I require those who DO use it to cite its source! If this code is used for commercial purposes I expect a (negotiable) cut! This file is an adjunct for rePYbot(c) written for Python 1.5.2 (OWT's v.) It handles i/o with FIBS Ausilliary file: FIBStn15.py CLASSES RBhandler class RBhandler | interface with FIBStn15 | | Methods defined here: | | __initDict__(self) | initialize the user dictionary | this might block on input if rawwho doesn't return an _endwho | or if 'set sortwho' fails | ## self.uDict={[str:name: [str:nAME, str:ratings, str:experience]]} | | __init__(self, uID, uPword, uClient, printer, master) | connect to FIBS and initialize the user dictionary | printer options for diagnostics are: | 'console', '' | | command(self, command) | send command to FIBS | | getRequest(self) | return ['name', 'word'(, ...)] tell from FIBS | False | guaranteed len()>=2 | | getShout(self) | return ['name', 'word'(, ...)] shout from FIBS | False | guaranteed len()>=2 | | logout(self) | send an exit command to FIBS | | output(self, line) | diagnostic output can go to: | 'console' stdout | fileTag file with CR | '' nowhere | | processLine(self, ts) | methods that do not use lines from FIBS fall through to this | | query(self, name1, name2) | return int:time in seconds of match between players | TimeBot will return 99999 for anything else! | else return "no TimeBot" | "lag" if FIBS is not responding | | tell(self, user, message) | tell user message | return "done told" whether user's logged in or not! | "lag" if FIBS is not responding | | whoami(self) | return str:printer(setting) requestQ[size] and uDict[size] | | whois(self, name) | return ['nAME', 'ratings', 'experience'] | else ['name', "No information found on user"] | "lag" if FIBS is not responding DATA False = False LAG = 30 True = True