diff orpg/networking/gsclient.py @ 124:8827271fbe1b alpha

Traipse Alpha 'OpenRPG' {091001-01} 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 (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log (See documentation for usage) Mercurial's hgweb folder is ported to upmana Happy Halloween!
author sirebral
date Sun, 01 Nov 2009 11:36:14 -0600
parents 9314d63c0941
children fba298d65cf8
line wrap: on
line diff
--- a/orpg/networking/gsclient.py	Sun Nov 01 01:12:50 2009 -0600
+++ b/orpg/networking/gsclient.py	Sun Nov 01 11:36:14 2009 -0600
@@ -29,15 +29,17 @@
 from __future__ import with_statement
 __version__ = "$Id: gsclient.py,v 1.53 2007/10/25 21:49:34 digitalxero Exp $"
 
+import meta_server_lib
+#import orpg.tools.orpg_settings
+import orpg.tools.rgbhex
+import traceback
+
 from orpg.dirpath import dir_struct
 from orpg.orpg_windows import *
-import meta_server_lib
-import orpg.tools.orpg_settings
+from orpg.tools.validate import validate
+from orpg.orpgCore import component
 from orpg.tools.orpg_settings import settings
-import orpg.tools.rgbhex
-from orpg.orpgCore import component
-import traceback
-from orpg.tools.validate import validate
+from orpg.tools.orpg_log import debug
 
 from xml.etree.ElementTree import ElementTree, Element
 from xml.etree.ElementTree import fromstring, tostring
@@ -82,13 +84,13 @@
     return 0
 
 class game_server_panel(wx.Panel):
+    ##debug()
     def __init__(self,parent):
         wx.Panel.__init__(self, parent, -1)
         self.parent = parent
         self.password_manager = component.get('password_manager')
         self.frame = component.get('frame')
         self.session = component.get('session')
-        #self.xml = component.get('xml') #Not used??
         self.serverNameSet = 0
         self.last_motd = ""
         self.buttons = {}
@@ -97,7 +99,7 @@
         self.build_ctrls()
         self.bookmarks()
         self.refresh_server_list()
-	self.refresh_room_list()
+        self.refresh_room_list()
         self.build_bookmark_menu() 
 
     def build_ctrls(self):
@@ -353,7 +355,8 @@
             self.cur_server_index = -1
         evt.Skip()
 
-    def add_room(self,data):
+    def add_room(self, data):
+        #debug()
         i = self.room_list.GetItemCount()
         if (data[2]=="1") or (data[2]=="True"): pwd="yes"
         else: pwd="no"
@@ -364,11 +367,12 @@
         self.refresh_room_list()
 
     def del_room(self, data):
+        #debug(data)
         i = self.room_list.FindItemData(-1, int(data[0]))
         self.room_list.DeleteItem(i)
         self.refresh_room_list()
 
-    def update_room(self,data):
+    def update_room(self, data):
         i = self.room_list.FindItemData(-1,int(data[0]))
         if data[2]=="1" : pwd="yes"
         else: pwd="no"
@@ -377,15 +381,15 @@
         self.room_list.SetStringItem(i,2,pwd)
         self.refresh_room_list()
 
-    def set_cur_room_text(self,name):
+    def set_cur_room_text(self, name):
         pass
         #self.texts["cur_room"].SetLabel(name)
         #self.sizers["room"].Layout()
 
-    def set_lobbybutton(self,allow):
+    def set_lobbybutton(self, allow):
         self.buttons['gs_join_lobby'].Enable(allow)
 
-    def set_connected(self,connected):
+    def set_connected(self, connected):
         self.buttons['gs_connect'].Enable(not connected)
         self.buttons['gs_disconnect'].Enable(connected)
         self.buttons['gs_join_room'].Enable(connected)
@@ -435,7 +439,6 @@
     def gs_close(self, evt):
         self.parent.OnMB_GameServerBrowseServers()
         
-
     def refresh_room_list(self):
         self.room_list.DeleteAllItems()
         address = self.texts["address"].GetValue()
@@ -483,7 +486,7 @@
                 part = 0
                 partLength = 1.0/length
                 for n in node_list:
-                    #if n.hasAttribute('id') and n.hasAttribute('name') and n.hasAttribute('num_users') and n.hasAttribute('address') and n.hasAttribute('port'):
+                    #if n.get('id') and n.get('name') and n.get('num_users') and n.get('address') and n.get('port'):
                     self.svrList.append(server_instance(n.get('id'), n.get('name'), 
                                         n.get('num_users'), n.get('address'), 
                                         n.get('port')))
@@ -626,7 +629,7 @@
 # [START] Snowdog: Updated Game Server Window 12/02
 #---------------------------------------------------------
 
-    def on_size(self,evt):
+    def on_size(self, evt):
         # set column widths for room list
         # set column widths for server list
         pass