Mercurial > traipse_dev
diff orpg/networking/mplay_server.py @ 151:06f10429eedc alpha
Traipse Alpha 'OpenRPG' {091125-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 (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
Pretty important update that can help remove thousands of dead children from your
gametree.
Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height
/>, etc... are all tags now. Check your gametree and look for dead children!!
New Gametree Recursion method, mapping, and context sensitivity. !Infinite Loops
return error instead of freezing the software!
New Syntax added for custom PC sheets
Tip of the Day added, from Core and community
Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to
prevent non updated clients from ruining the fix.
author | sirebral |
---|---|
date | Wed, 25 Nov 2009 06:15:49 -0600 |
parents | 8e07c1a2c69b |
children | 5609ac142298 |
line wrap: on
line diff
--- a/orpg/networking/mplay_server.py Tue Nov 24 17:17:42 2009 -0600 +++ b/orpg/networking/mplay_server.py Wed Nov 25 06:15:49 2009 -0600 @@ -91,7 +91,6 @@ self.voice = {} self.persistant = persist self.mapFile = None - ### Needs to use Element Tree closer if mapFile != None: tree = parse(mapFile) else: tree = parse(dir_struct["template"] + "default_map.xml") tree = tree.getroot() @@ -349,7 +348,6 @@ # as needed, over-riding any default values as requested. def initServerConfig(self): - debug(log=False) self.log_msg("Processing Server Configuration File... " + self.userPath) # make sure the server_ini.xml exists! validate.config_file( "server_ini.xml", "default_server_ini.xml" ) @@ -849,7 +847,6 @@ self.log_msg("Server stopped!") def log_msg(self,msg): - debug(parents=True) if self.log_to_console: if self.log_console: self.log_console(msg) else: print str(msg) @@ -1195,6 +1192,7 @@ self.handle_role("set", props['id'], "GM", self.groups[LOBBY_ID].boot_pwd, LOBBY_ID) cmsg = "Client Connect: (" + str(props['id']) + ") " + str(props['name']) + " [" + str(props['ip']) + "]" self.log_msg(cmsg) + self.log_msg(("update_group", (self.groups[LOBBY_ID].name, LOBBY_ID, len(self.groups[LOBBY_ID].players) ) )) cmsg = ("connect", props) ################################################# self.log_msg(cmsg) @@ -1605,6 +1603,7 @@ #notify user about others in the room self.return_room_roles(from_id,group_id) self.log_msg(("join_group", (self.groups[group_id].name, group_id, from_id))) + self.log_msg(("update_group", (self.groups[group_id].name, group_id, len(self.groups[group_id].players) ))) self.handle_role("set", from_id, self.players[from_id].role, self.groups[group_id].boot_pwd, group_id) except Exception, e: self.log_msg(str(e)) @@ -1909,7 +1908,7 @@ def handle_role(self, act, player, role, given_boot_pwd, group_id): if act == "display": - msg = "<msg to=\"" + player + "\" from=\"0\" group_id=\"" + group_id + "\" />" + msg = "<msg to='" + player + "' from='0' group_id='" + group_id + "' />" msg += "Displaying Roles<br /><br /><u>Role</u>   <u>Player</u><br />" keys = self.players.keys() for m in keys: @@ -1996,7 +1995,7 @@ self.check_group(to_id, group_id) else: #tell the clients password manager the password failed -- SD 8/03 - pm = "<password signal=\"fail\" type=\"admin\" id=\"" + group_id + "\" data=\"\"/>" + pm = "<password signal='fail' type='admin' id='" + group_id + "' data=''/>" self.players[from_id].outbox.put(pm) print "boot passwords did not match" @@ -2027,8 +2026,9 @@ time.sleep( 1 ) self.log_msg("kicking player " + str(id) + " from server.") + # Send delete player event to all - self.send_to_group("0",group_id,self.players[id].toxml("del")) + self.send_to_group("0", group_id, self.players[id].toxml("del")) # Remove the player from local data structures self.del_player(id,group_id) @@ -2080,8 +2080,7 @@ # Send a message to everyone in the victim's room, letting them know someone has been booted ban_msg = "<msg to='all' from='0' group_id='%s'/><font color='#FF0000'>Banning '(%s) %s' from server... %s</font>" % ( group_id, id, self.players[id].name, str(message)) self.log_msg("ban_msg:" + ban_msg) - if (silent == 0): - self.send_to_group("0", group_id, ban_msg) + if (silent == 0): self.send_to_group("0", group_id, ban_msg) time.sleep( .1 ) self.log_msg("baning player " + str(id) + " from server.") @@ -2520,12 +2519,11 @@ keys = self.groups.keys() keys.sort(id_compare) for k in keys: - debug((self.groups, self.groups[k], self.groups[k].name)) groupstring = "<tr><td bgcolor='" + COLOR2 + "' colspan='2'>" groutstring += "<b>Group " + str(k) + ": " + self.groups[k].name + "</b>" groupstring += "</td><td bgcolor=" + COLOR2 + " > <i>Password: " + self.groups[k].pwd + "</td>" groupstring += "<td bgcolor=" + COLOR2 + " > Boot: " + self.groups[k].boot_pwd + "</i></td></tr>" - pl += groupstring; debug(groupstring) + pl += groupstring ids = self.groups[k].get_player_ids() ids.sort(id_compare) for id in ids: