comparison orpg/networking/mplay_groups.py @ 92:68c7bd272f27 beta

Traipse Beta 'OpenRPG' {090919-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: Adds menu changes to draw attention to important updates, errors, or other events. (image info coming soon) Traipse URL is not included in the repos tab and is set as default. Fixes Copy for Windows and Linux (finally!!) users. Fixes incomplete update to Grid and List nodes. Fixes incomplete update to Chat Commands. Fixes problems with Remote Image Upload. Fixes Drop and Drag of Minis to Map. CherryPy can now use any image in the webfiles/ folder and sub-folders. CherryPy can now Drop and Drag Minis to the Map. Minor changes to Update Manager's GUI. Expert recommendation warning added to Revision Update. Step down compatibility with open_rpg & component added to orpgCore. Using majority of 'Grumpy' network folder to correct server lag.
author sirebral
date Sat, 19 Sep 2009 06:50:43 -0500
parents 449a8900f9ac
children 65c1604e7949
comparison
equal deleted inserted replaced
84:5c12918d6bb2 92:68c7bd272f27
1 from orpg.mapper.map_msg import * 1 from orpg.mapper.map_msg import *
2 2
3 class game_group: 3 class game_group:
4 def __init__( self, id, name, pwd, desc="", 4 def __init__( self, id, name, pwd, desc="", boot_pwd="", minVersion="", mapFile=None, messageFile=None, persist =0 ):
5 boot_pwd="", minVersion="",
6 mapFile=None, messageFile=None, persist=0 ):
7 self.id = id 5 self.id = id
8 self.name = name 6 self.name = name
9 self.desc = desc 7 self.desc = desc
10 self.minVersion = minVersion 8 self.minVersion = minVersion
11 self.messageFile = messageFile 9 self.messageFile = messageFile
33 31
34 def add_player(self,id): 32 def add_player(self,id):
35 self.players.append(id) 33 self.players.append(id)
36 34
37 def remove_player(self,id): 35 def remove_player(self,id):
38 if self.voice.has_key(id): del self.voice[id] 36 if self.voice.has_key(id):
37 del self.voice[id]
39 self.players.remove(id) 38 self.players.remove(id)
40 39
41 def get_num_players(self): 40 def get_num_players(self):
42 num = len(self.players) 41 num = len(self.players)
43 return num 42 return num
44 43
45 def get_player_ids(self): 44 def get_player_ids(self):
46 tmp = self.players 45 tmp = self.players
47 return tmp 46 return tmp
47
48 48
49 def check_pwd(self,pwd): 49 def check_pwd(self,pwd):
50 return (pwd==self.pwd) 50 return (pwd==self.pwd)
51 51
52 def check_boot_pwd(self,pwd): 52 def check_boot_pwd(self,pwd):
59 version=ver.split('.') 59 version=ver.split('.')
60 for i in range(min(len(minVersion),len(version))): 60 for i in range(min(len(minVersion),len(version))):
61 w=max(len(minVersion[i]),len(version[i])) 61 w=max(len(minVersion[i]),len(version[i]))
62 v1=minVersion[i].rjust(w); 62 v1=minVersion[i].rjust(w);
63 v2=version[i].rjust(w); 63 v2=version[i].rjust(w);
64 if v1<v2: return 1 64 if v1<v2:
65 if v1>v2: return 0 65 return 1
66 if v1>v2:
67 return 0
66 68
67 if len(minVersion)>len(version): return 0 69 if len(minVersion)>len(version):
70 return 0
68 return 1 71 return 1
69 72
70 #depreciated - see send_group_list() 73 #depreciated - see send_group_list()
71 def toxml(self,act="new"): 74 def toxml(self,act="new"):
72 # Please don't add the boot_pwd to the xml, as this will give it away to players watching their console 75 # Please don't add the boot_pwd to the xml, as this will give it away to players watching their console