# HG changeset patch
# User sirebral
# Date 1276675282 18000
# Node ID f6aca9a7370b23fb5864e8443095bec0c2bcf559
# Parent f96e0e6d32d2e9593e6a5a2d4c2448333dbe4b6b
Traipse Alpha 'OpenRPG' {100616-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 (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.
diff -r f96e0e6d32d2 -r f6aca9a7370b orpg/networking/gsclient.py
--- a/orpg/networking/gsclient.py Tue Jun 15 18:55:49 2010 -0500
+++ b/orpg/networking/gsclient.py Wed Jun 16 03:01:22 2010 -0500
@@ -349,7 +349,9 @@
i = self.room_list.GetItemCount()
if (data[2]=="1") or (data[2]=="True"): pwd="yes"
else: pwd="no"
- self.room_list.InsertStringItem(i,data[1])
+ name = data[1].replace('&', "&")
+ name = name.replace('"', '"e;').replace("'", ''').replace("<", "<").replace(">", ">").replace('"', '"').replace(''', "'")
+ self.room_list.InsertStringItem(i, name)
self.room_list.SetStringItem(i,1,data[3])
self.room_list.SetStringItem(i,2,pwd)
self.room_list.SetItemData(i,int(data[0]))
@@ -441,7 +443,9 @@
i = self.room_list.GetItemCount()
if (g[2]=="True") or (g[2]=="1") : pwd="yes"
else: pwd="no"
- self.room_list.InsertStringItem(i, g[1])
+ name = g[1].replace('&', "&")
+ name = name.replace('"', '"e;').replace("'", ''').replace("<", "<").replace(">", ">")
+ self.room_list.InsertStringItem(i, name)
self.room_list.SetStringItem(i, 1, g[3])
self.room_list.SetStringItem(i, 2, pwd)
self.room_list.SetItemData(i, int(g[0]))
@@ -481,7 +485,9 @@
rooms = n.findall('room')
for room in rooms:
- self.rmList[address].append((room.get("id"), room.get("name"),
+ name = room.get('name').replace('&', "&")
+ name = name.replace('"', '"e;').replace("'", ''').replace("<", "<").replace(">", ">")
+ self.rmList[address].append((room.get("id"), name,
room.get("pwd"), room.get("num_users")))
self.svrList.sort(server_instance_compare)
@@ -568,36 +574,7 @@
name = self.texts["room_name"].GetValue()
boot_pwd = self.texts["room_boot_pwd"].GetValue()
minversion = self.texts["room_min_version"].GetValue()
- #
- # Check for & in name. We want to allow this becaus of its common use in D&D.
- #
- loc = name.find("&")
- oldloc=0
- while loc > -1:
- loc = name.find("&",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + "&" + e
- oldloc = loc+1
- loc = name.find('"')
- oldloc=0
- while loc > -1:
- loc = name.find('"',oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + ""e;" + e
- oldloc = loc+1
- loc = name.find("'")
- oldloc=0
- while loc > -1:
- loc = name.find("'",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + "'" + e
- oldloc = loc+1
+
if self.buttons['gs_pwd'].GetValue(): pwd = self.texts["room_pwd"].GetValue()
else: pwd = ""
if name == "": wx.MessageBox("Invalid Name","Error");
diff -r f96e0e6d32d2 -r f6aca9a7370b orpg/networking/mplay_server.py
--- a/orpg/networking/mplay_server.py Tue Jun 15 18:55:49 2010 -0500
+++ b/orpg/networking/mplay_server.py Wed Jun 16 03:01:22 2010 -0500
@@ -51,6 +51,7 @@
from mplay_client import MPLAY_LENSIZE
from orpg.dirpath import dir_struct
import orpg.tools.validate
+import htmlentitydefs
from orpg.mapper.map_msg import *
from threading import Lock, RLock
@@ -316,7 +317,7 @@
self.banDoc = self.banDom.getroot()
for element in self.banDom.findall('banned'):
- playerName = element.get('name').replace("&", "&").replace("<", "<").replace('"', """).replace(">", ">")
+ playerName = element.get('name').replace("&", "&").replace("<", "<").replace('"', "").replace(">", ">")
playerIP = element.get('ip')
self.ban_list[playerIP] = {}
self.ban_list[playerIP]['ip'] = playerIP
@@ -336,7 +337,7 @@
etreeEl = Element('server')
for ip in self.ban_list:
el = Element('banned')
- el.set('name', str(self.ban_list[ip]['name'].replace("&", "&").replace("<", "<").replace(""", '"').replace(">", ">")))
+ el.set('name', str(self.ban_list[ip]['name'].replace("&", "&").replace("<", "<").replace("", '"').replace(">", ">")))
el.set('ip', str(self.ban_list[ip]['ip']))
etreeEl.append(el)
file = open(self.userPath + self.banFile ,"w")
@@ -1691,33 +1692,8 @@
# Check for & in name. We want to allow this because of its common
# use in d&d games.
try:
- loc = name.find("&")
- oldloc = 0
- while loc > -1:
- loc = name.find("&",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- value = b + "&" + e
- oldloc = loc+1
- loc = name.find("'")
- oldloc = 0
- while loc > -1:
- loc = name.find("'",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + "'" + e
- oldloc = loc+1
- loc = name.find('"')
- oldloc = 0
- while loc > -1:
- loc = name.find('"',oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + """ + e
- oldloc = loc+1
+ name = name.replace('&', '&')
+ name = name.replace('"', '"e;').replace("'", ''').replace("<", "<").replace(">", ">")
oldroomname = self.groups[gid].name
self.groups[gid].name = str(name)
lmessage = "Room name changed to from \"" + oldroomname + "\" to \"" + name + "\""
@@ -1744,34 +1720,8 @@
# Check for & in name. We want to allow this because of its common
# use in d&d games.
-
- loc = name.find("&")
- oldloc = 0
- while loc > -1:
- loc = name.find("&",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + "&" + e
- oldloc = loc+1
- loc = name.find("'")
- oldloc = 0
- while loc > -1:
- loc = name.find("'",oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + "'" + e
- oldloc = loc+1
- loc = name.find('"')
- oldloc = 0
- while loc > -1:
- loc = name.find('"',oldloc)
- if loc > -1:
- b = name[:loc]
- e = name[loc+1:]
- name = b + """ + e
- oldloc = loc+1
+ name = name.replace('&', '&')
+ name = name.replace('"', '"e;').replace("'", ''').replace("<", "<").replace(">", ">")
group_id = str(self.next_group_id)
self.next_group_id += 1
@@ -2027,31 +1977,31 @@
"""
if given_boot_pwd == server_admin_pwd:
# Send a message to everyone in the room, letting them know someone has been booted
- boot_msg = "Booting '(%s) %s' from server..." % (from_id, group_id, to_id, self.players[to_id].name)
+ msg = ''
+ msg += 'Booting (' +str(to_id)+ ') ' +self.players[to_id].name+ ' from server...'
+
+ boot_msg = self.buildMsg('all', '0', group_id, msg)
self.log_msg("boot_msg:" + boot_msg)
self.send_to_group( "0", group_id, boot_msg )
time.sleep( 1 )
self.log_msg("Booting player " + str(to_id) + " from server.")
-
# Send delete player event to all
self.send_to_group("0",group_id,self.players[to_id].toxml("del"))
-
# Remove the player from local data structures
self.del_player(to_id,group_id)
-
# Refresh the group data
self.check_group(to_id, group_id)
elif actual_boot_pwd == given_boot_pwd:
# Send a message to everyone in the room, letting them know someone has been booted
- boot_msg = "Booting '(%s) %s' from room..." % (from_id, group_id, to_id, self.players[to_id].name)
+ msg = ''
+ msg += 'Booting (' +str(to_id)+ ') ' +self.players[to_id].name+ ' from server...'
+ boot_msg = self.buildMsg('all', from_id, group_id, msg)
self.log_msg("boot_msg:" + boot_msg)
self.send_to_group( "0", group_id, boot_msg )
time.sleep( 1 )
-
#dump player into the lobby
self.move_player(to_id,"0")
-
# Refresh the group data
self.check_group(to_id, group_id)
else:
@@ -2112,7 +2062,7 @@
configDom = parse(dir_struct["user"] + 'ban_list.xml')
self.ban_list = {}
for element in configDom.findall('banned'):
- player = element.get('name').replace("&", "&").replace("<", "<").replace('"', """).replace(">", ">")
+ player = element.get('name').replace("&", "&").replace("<", "<").replace('"', "").replace(">", ">")
ip = element.get('ip')
self.ban_list[ip] = {}
self.ban_list[ip]['ip'] = ip
diff -r f96e0e6d32d2 -r f6aca9a7370b orpg/orpg_version.py
--- a/orpg/orpg_version.py Tue Jun 15 18:55:49 2010 -0500
+++ b/orpg/orpg_version.py Wed Jun 16 03:01:22 2010 -0500
@@ -4,7 +4,7 @@
#BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
DISTRO = "Traipse Alpha"
DIS_VER = "Ornery Orc"
-BUILD = "100615-02"
+BUILD = "100616-00"
# This version is for network capability.
PROTOCOL_VERSION = "1.2"