Filthy newline drama?
[craw.git] / script / flash.py
blobd35066b8c1057d7df9b857aa06b9710af1bb7add
1 import craw, threading, time, utility
3 class flash_thread(threading.Thread):
4 def __init__(self, id, delay):
5 threading.Thread.__init__(self)
6 self.id = id
7 self.run_thread = True
8 self.delay = delay
9 self.start()
11 def run(self):
12 while self.run_thread:
13 flash_player(self.id)
14 time.sleep(self.delay)
16 def flash_player(id):
17 packet = '\x4b\x00\x00\x00\x00' + utility.pack_number(id, 4)
18 craw.send_packet(packet)