def writeToNetwork(content, broadcast_destination):
    message = messages.shoutbox_message()
    message.set(content)
    casting = broadcast.broadcast()
    casting.setDestination(broadcast_destination)
    casting.set(message.get_message())
    casting.send()
Exemplo n.º 2
0
def writeToNetwork(content, broadcast_destination):
    message = messages.shoutbox_message()
    message.set(content)
    casting = broadcast.broadcast()
    casting.setDestination(broadcast_destination)
    casting.set(message.get_message())
    casting.send()
Exemplo n.º 3
0
 def handle(self):
     global lastmsg
     data = self.request[0].strip()
     socket = self.request[1]
     if data[:9] == "piratebox":
         if data[10:12] == "sb":
             if data != lastmsg:
                 msg = messages.shoutbox_message()
                 msg.set_message(data)
                 content = msg.get()
                 writeToDisk(content)
                 generate_html_from_file()
                 lastmsg = data
         else:
             print data[11:12]
             print data
     else:
         print "debug : not a piratebox message"