Example #1
0
	def closed(self, code, reason):
		if (code != 1000):
			Logger.writeLine('Connection with Twitch-IRC was lost. Trying to reconnect...')
		else:
			Logger.debugLine('Disconnected from Twitch-IRC.')
		
		# Try to connect again.
		self.init(self, self.lurkbot)
		self.connect()
		Logger.debugLine('Disconnected: [' + str(code) + '] [' + str(reason) + ']')
Example #2
0
    def run(self):
        while not self.killed:
            try:
                line = input()

                if (line == 'exit'):
                    sys.exit(1)

                sleep(0.02)
            except Exception as ex:
                Logger.debugLine(ex)
Example #3
0
	def sendRaw(self, message):
		Logger.debugLine('[RAW] ' + message)
		self.send(message)
Example #4
0
 def _userstate(self, lurkbot, connection, channel, username, message,
                tags):
     Logger.debugLine('[USERSTATE] [' + channel + '] ' + (
         'user' if len(tags['user-type']) == 0 else tags['user-type']))
Example #5
0
 def _roomstate(self, lurkbot, connection, channel, username, message,
                tags):
     Logger.debugLine('[ROOMSTATE] [' + channel + '] [' + username + '] ' +
                      str(tags))