comparison orpg/networking/mplay_server_gui.py @ 231:cc7629ab526d alpha

Traipse Alpha 'OpenRPG' {100614-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Closing/Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug.
author sirebral
date Mon, 14 Jun 2010 15:20:08 -0500
parents 24769389a7ba
children
comparison
equal deleted inserted replaced
230:2e2281ed40a9 231:cc7629ab526d
346 broadcast = '<chat type="1" version="1.0"><font color="#FF0000">' +msg+ '</font></chat>' 346 broadcast = '<chat type="1" version="1.0"><font color="#FF0000">' +msg+ '</font></chat>'
347 chat = Element('chat') 347 chat = Element('chat')
348 chat.set('type', '1') 348 chat.set('type', '1')
349 chat.set('version', '1.0') 349 chat.set('version', '1.0')
350 chat.text = broadcast 350 chat.text = broadcast
351 msg = self.main.server.server.buildMsg('all', '0', '1', tostring(chat)) 351 msg = self.main.server.server.buildMsg('all',
352 '0',
353 str(self.main.server.server.players[playerID]),
354 tostring(chat))
352 355
353 if len(msg): self.main.server.server.send_to_group('0', str(groupID), msg ) 356 if len(msg): self.main.server.server.send_to_group('0', str(groupID), msg )
354 elif menuItem == 6: 357 elif menuItem == 6:
355 msg = self.GetMessageInput( "Broadcast Server Message" ) 358 msg = self.GetMessageInput( "Broadcast Server Message" )
356 if len(msg): self.main.server.server.broadcast(msg ) 359 if len(msg): self.main.server.server.broadcast(msg )
418 421
419 # File Menu 422 # File Menu
420 menu = wx.Menu() 423 menu = wx.Menu()
421 menu.Append(1, 'Start', 'Start server.') 424 menu.Append(1, 'Start', 'Start server.')
422 menu.Append(2, 'Stop', 'Shutdown server.') 425 menu.Append(2, 'Stop', 'Shutdown server.')
426 menu.Append(16, 'Clear Log', 'Empty server log')
423 menu.AppendSeparator() 427 menu.AppendSeparator()
424 menu.Append(3, 'E&xit', 'Exit application.') 428 menu.Append(3, 'E&xit', 'Exit application.')
425 self.Bind(wx.EVT_MENU, self.OnStart, id=1) 429 self.Bind(wx.EVT_MENU, self.OnStart, id=1)
426 self.Bind(wx.EVT_MENU, self.OnStop, id=2) 430 self.Bind(wx.EVT_MENU, self.OnStop, id=2)
427 self.Bind(wx.EVT_MENU, self.OnExit, id=3) 431 self.Bind(wx.EVT_MENU, self.OnExit, id=3)
453 self.Bind(wx.EVT_MENU, self.ModifyBanList, id=6) 457 self.Bind(wx.EVT_MENU, self.ModifyBanList, id=6)
454 self.Bind(wx.EVT_MENU, self.PingPlayers, id=7) 458 self.Bind(wx.EVT_MENU, self.PingPlayers, id=7)
455 self.Bind(wx.EVT_MENU, self.StopPingPlayers, id=8) 459 self.Bind(wx.EVT_MENU, self.StopPingPlayers, id=8)
456 self.Bind(wx.EVT_MENU, self.ConfigPingInterval, id=9) 460 self.Bind(wx.EVT_MENU, self.ConfigPingInterval, id=9)
457 self.Bind(wx.EVT_MENU, self.LogToggle, id=10) 461 self.Bind(wx.EVT_MENU, self.LogToggle, id=10)
462 self.Bind(wx.EVT_MENU, self.ClearLog, id=16)
458 self.mainMenu.Append( menu, '&Configuration') 463 self.mainMenu.Append( menu, '&Configuration')
459 464
460 # Traipse Suite of Additions. 465 # Traipse Suite of Additions.
461 self.traipseSuite = wx.Menu() 466 self.traipseSuite = wx.Menu()
462 self.debugger = DebugConsole(self) 467 self.debugger = DebugConsole(self)
559 564
560 565
561 # Event handler for out logging event 566 # Event handler for out logging event
562 def LogToggle(self, event): 567 def LogToggle(self, event):
563 self.do_log = event.IsChecked() 568 self.do_log = event.IsChecked()
569
570 def ClearLog(self, event):
571 self.log.SetValue('')
564 572
565 def OnLogMessage( self, event ): 573 def OnLogMessage( self, event ):
566 self.Log( event.message ) 574 self.Log( event.message )
567 575
568 # Event handler for out logging event 576 # Event handler for out logging event