Esempio n. 1
0
	def sendChatServer(self,data):
		'''send the chat message to everyone but the sender'''
		for client in self.connections:
			if client != data[0]:
				#send the chat message everywhere
				stringOut=Protical.chatSend(data[1][1][0])#the string to send out
				self.toWrite.put( (client,stringOut) )
		return
Esempio n. 2
0
 def sendChatServer(self, data):
     '''send the chat message to everyone but the sender'''
     for client in self.connections:
         if client != data[0]:
             #send the chat message everywhere
             stringOut = Protical.chatSend(
                 data[1][1][0])  #the string to send out
             self.toWrite.put((client, stringOut))
     return
Esempio n. 3
0
 def sendLevelToLoad(self, data):
     client = data[0]
     payload = Protical.sendLevelToLoad(self.levelName)
     self.toWrite.put((client, payload))
     return
Esempio n. 4
0
 def requestLevel(self):
     msg = Protical.requestLevel()
     self.toSend.put(msg)
Esempio n. 5
0
 def msg(self):
     self.toSend.put(Protical.chatSend("poop"))
Esempio n. 6
0
 def die(self):
     ''' safely quit the game'''
     self.toSend.put(Protical.sendQuit())
     self.sendData()
     sys.exit(0)
Esempio n. 7
0
	def sendLevelToLoad( self, data ):
		client = data [0]
		payload = Protical.sendLevelToLoad( self.levelName )
		self.toWrite.put( (client, payload) )
		return
Esempio n. 8
0
	def requestLevel( self ):
		msg = Protical.requestLevel()
		self.toSend.put(msg)
Esempio n. 9
0
	def msg(self):
		self.toSend.put(Protical.chatSend("poop"))
Esempio n. 10
0
	def die(self):
		''' safely quit the game'''
		self.toSend.put( Protical.sendQuit() );
		self.sendData()
		sys.exit(0)