comparison orpg/networking/mplay_server_gui.py @ 58:27e58b0483e7 traipse_dev

Fixed major bug that caused an error to spit out in Windows platforms. Added /tmp/tmp.txt placeholder to ensure the /tmp/ folder is there. removed more print statements.
author sirebral
date Sat, 08 Aug 2009 00:25:33 -0500
parents 9014d7861bb3
children c54768cffbd4
comparison
equal deleted inserted replaced
57:9014d7861bb3 58:27e58b0483e7
222 else: self.add(player) 222 else: self.add(player)
223 223
224 def updateRoom( self, data ): 224 def updateRoom( self, data ):
225 (room, room_id, player) = data 225 (room, room_id, player) = data
226 i = self.FindItemData( -1, int(player) ) 226 i = self.FindItemData( -1, int(player) )
227 self.SetStringItem( i, 3, room ) 227 if i > 0: self.SetStringItem( i, 3, room )
228 self.AutoAjust() 228 self.AutoAjust()
229 229
230 def setPlayerRole( self, id, role ): 230 def setPlayerRole( self, id, role ):
231 i = self.FindItemData( -1, int(id) ) 231 i = self.FindItemData( -1, int(id) )
232 self.SetStringItem( i, 5, role ) 232 self.SetStringItem( i, 5, role )
273 if len(msg): self.main.server.server.send( msg, playerID, str(groupID) ) 273 if len(msg): self.main.server.server.send( msg, playerID, str(groupID) )
274 #Leave this in for now. 274 #Leave this in for now.
275 elif menuItem == MENU_PLAYER_SEND_ROOM_MESSAGE: 275 elif menuItem == MENU_PLAYER_SEND_ROOM_MESSAGE:
276 print "Send message to room..." 276 print "Send message to room..."
277 msg = self.GetMessageInput( "Send message to room of this player") 277 msg = self.GetMessageInput( "Send message to room of this player")
278 if len(msg): 278 if len(msg): self.main.server.server.send_to_group('0', str(groupID), msg )
279 self.main.server.server.send_to_group("0", str(groupID), msg )
280 279
281 elif menuItem == MENU_PLAYER_SEND_SERVER_MESSAGE: 280 elif menuItem == MENU_PLAYER_SEND_SERVER_MESSAGE:
282 print "broadcast a message..." 281 print "broadcast a message..."
283 msg = self.GetMessageInput( "Broadcast Server Message" ) 282 msg = self.GetMessageInput( "Broadcast Server Message" )
284 # If we got a message back, send it 283 # If we got a message back, send it