示例#1
0
	def __init__(self,user,passwd):
		TocTalk.__init__(self,user,passwd)
		self.IMcount = 0
		self.messages = [
"I'm angry, don't talk to me...",
"That's it!  If you talk to me one more time, I'm going to warn you.",
"You asked for it." ]
示例#2
0
 def __init__(self, user, passwd, recv_func=None):
     """
     Initialize the connection both as a TocTalk subclass.
     """
     TocTalk.__init__(self, user, passwd)
     self._recv_func = recv_func
     self._ready = False
     self._debug = 0
示例#3
0
	def __init__(self, lovejoy, name, passwd):
		TocTalk.__init__(self, name, passwd)
		self._info = "This is the Lovejoy AIM Bot. Type \"help\" for commands."
		self.lovejoy = lovejoy
		self.lovejoy.connect()
		self.currTime = time.localtime()
		self.danceLyrics = ["We can dance if we want too", 
				   "We can leave your friends behind", 
				   "'Cause if your friends don't dance", 
			     	   "and if they don't dance", 
				   "Well they're no friends of mine"]	
示例#4
0
    def connect(self):
        """
        Connect to the AIM service.  Overrides the behavior of the 
        superclass by waiting until login has completed before returning.
        """
        # Start the connection & login process to AIM
        TocTalk.connect(self)

        # Set socket to non-blocking, to be multitasking-friendly
        self._socket.setblocking(0)

        # Process events until login is a success
        while not self._ready:
            self.runOnce()
            time.sleep(0.1)
示例#5
0
文件: im.py 项目: dagvl/commitmessage
    def execute(self):
        """Sends the IM with the commit message"""
        from toc import TocTalk, BotManager

        bm = BotManager()
        bot = TocTalk(self.screenname, self.password)

        bm.addBot(bot, "bot")
        time.sleep(4)

        message = self._generateMessage()

        names = [name.strip() for name in self.to.split(',')]
        for name in names:
            print name
            bot.do_SEND_IM(name, message)
示例#6
0
文件: googlebot.py 项目: jamwt/py-toc
 def __init__(self, user, pw):
     TocTalk.__init__(self, user, pw)
     self._info = "Google-AIM Bot"
示例#7
0
文件: aim.py 项目: kzahel/oldprogs
	def __init__(self,name,passwd,outer,hl):
		TocTalk.__init__(self,name,passwd)
		self.outer = outer
		self.blist = {}
		self.hl = hl
示例#8
0
文件: ProxyBotn.py 项目: jamwt/py-toc
	def __init__(self,uname,password):
		TocTalk.__init__(self,uname,password)
示例#9
0
文件: RelayBots.py 项目: jamwt/py-toc
	def __init__(self,user,passwd, masterSN):
		TocTalk.__init__(self,user,passwd)
		self.masterSN = masterSN
示例#10
0
文件: RelayBots.py 项目: jamwt/py-toc
	def __init__(self,user,passwd):
		TocTalk.__init__(self,user,passwd)
		# great method of passing data 
		# between the threads
		self.queue = Queue.Queue()