Mercurial > traipse_dev
comparison orpg/networking/meta_server_lib.py @ 238:b44dad398833 beta
Traipse Beta 'OpenRPG' {100619-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
Updates:
Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence.
Update to Browser Server window. Display rooms with ' " & cleaner
Update to Server. Handles ' " & cleaner.
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
Fix to Gametree for XSLT Sheets
author | sirebral |
---|---|
date | Sat, 19 Jun 2010 10:17:24 -0500 |
parents | 9230a33defd9 |
children | 1df5912db00c |
comparison
equal
deleted
inserted
replaced
237:42f4809ad8a8 | 238:b44dad398833 |
---|---|
132 | 132 |
133 for meta in meta_list: # check all of the metas | 133 for meta in meta_list: # check all of the metas |
134 #get the server's xml from the current meta | 134 #get the server's xml from the current meta |
135 bad_meta = 0 | 135 bad_meta = 0 |
136 #print "Getting server list from " + meta + "..." | 136 #print "Getting server list from " + meta + "..." |
137 try: xml_dom = get_server_dom(data, meta.get('url')) | 137 try: meta_path = meta.get('url'); xml_dom = get_server_dom(data, meta_path) |
138 except: bad_meta = 1; print "Trouble getting servers from " + meta.get('url') + "..." | 138 except: |
139 if meta_path == None: meta_path = 'No URL available' | |
140 bad_meta = 1; print "Trouble getting servers from " +meta_path+ "..." | |
139 if bad_meta: continue | 141 if bad_meta: continue |
140 node_list = xml_dom.findall('server') | 142 node_list = xml_dom.findall('server') |
141 if len(node_list): | 143 if len(node_list): |
142 for n in node_list: | 144 for n in node_list: |
143 if not n.get('name'): n.set('name','NO_NAME_GIVEN') | 145 if not n.get('name'): n.set('name','NO_NAME_GIVEN') |
149 if not n.get('port'): n.set('port','6774') | 151 if not n.get('port'): n.set('port','6774') |
150 port = n.get('port') | 152 port = n.get('port') |
151 n.set('meta',meta) | 153 n.set('meta',meta) |
152 end_point = str(address) + ":" + str(port) | 154 end_point = str(address) + ":" + str(port) |
153 if return_hash.has_key(end_point): | 155 if return_hash.has_key(end_point): |
154 print end_point | |
155 print n | |
156 | |
157 if META_DEBUG: print "Replacing duplicate server entry at " + end_point | 156 if META_DEBUG: print "Replacing duplicate server entry at " + end_point |
158 return_hash[end_point] = n | 157 return_hash[end_point] = n |
159 server_list = Element('servers') | 158 server_list = Element('servers') |
160 sort_list = return_hash.values() | 159 sort_list = return_hash.values() |
161 if sort_by == "start": sort_list.sort(byStartAttribute) | 160 if sort_by == "start": sort_list.sort(byStartAttribute) |
361 "server_data[cookie]":self.cookie, | 360 "server_data[cookie]":self.cookie, |
362 "server_data[version]":PROTOCOL_VERSION, | 361 "server_data[version]":PROTOCOL_VERSION, |
363 "act":"unregister"} ) | 362 "act":"unregister"} ) |
364 for path in getMetaServerList(): | 363 for path in getMetaServerList(): |
365 try: # this POSTS the request and returns the result | 364 try: # this POSTS the request and returns the result |
366 etreeEl = get_server_dom(data, path.get('url')) | 365 etreeEl = get_server_dom(data, self.path) |
367 if etreeEl.get("errmsg") != None: | 366 if etreeEl.get("errmsg") != None: |
368 print "Error durring unregistration: " + etreeEl.get("errmsg") | 367 print "Error durring unregistration: " +etreeEl.get("errmsg") |
369 except Exception, e: | 368 except Exception, e: |
370 if META_DEBUG: print "Problem talking to Meta. Will go ahead and die, letting Meta remove us." | 369 if META_DEBUG: print "Problem talking to Meta. Will go ahead and die, letting Meta remove us." |
371 if META_DEBUG: print e | 370 if META_DEBUG: print e |
372 # If there's an error, echo it to the console | 371 # If there's an error, echo it to the console |
373 | 372 |
446 | 445 |
447 # If there is a DOM returned .... | 446 # If there is a DOM returned .... |
448 if etreeEl != None: | 447 if etreeEl != None: |
449 # If there's an error, echo it to the console | 448 # If there's an error, echo it to the console |
450 if etreeEl.get("errmsg") != None: | 449 if etreeEl.get("errmsg") != None: |
451 print "Error durring registration at: " +path.get('url')+ " Error: " +etreeEl.get("errmsg") | 450 print "Error durring registration at: " +self.path+ " Error: " +etreeEl.get("errmsg") |
452 if META_DEBUG: print data | 451 if META_DEBUG: print data |
453 if META_DEBUG: print | 452 if META_DEBUG: print |
454 """ | 453 """ |
455 No special handling is required. If the registration worked, id, cookie, and interval | 454 No special handling is required. If the registration worked, id, cookie, and interval |
456 can be stored and used for the next time. | 455 can be stored and used for the next time. |