comparison orpg/networking/mplay_groups.py @ 100:7ed4979cc1cf beta

Traipse Beta 'OpenRPG' {090925-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: 090925-00: 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. Fixes CherryPit misspelling. Makes Traipse Suite 'Attention' item portable, and executes it on 'Critical' debug notices. Adds incomplete Shift + Enter to Text Entry, currently creates a 'Critical' warning. New default Lobby Map, designed for Traipse. Feel free to change it. Updates to Server GUI: * Admin can Ban from Backend. * Admin can Modify Ban List and Un Ban users. * Server GUI finds your Lobby Name * New users default as Lurker unless a Role is set Cleaner TraipseSuiteAttention portability and clean up in Main. Die Roll Commands addition from Core code allowing Math Ordering with ()'s New About Dialog. A more uniform About Dialog. Corrects image loading of duplicate images.
author sirebral
date Fri, 25 Sep 2009 20:46:02 -0500
parents 68c7bd272f27
children 9314d63c0941 dcf4fbe09b70
comparison
equal deleted inserted replaced
94:118fbe111922 100:7ed4979cc1cf
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="", boot_pwd="", minVersion="", mapFile=None, messageFile=None, persist =0 ): 4 def __init__( self, id, name, pwd, desc="",
5 boot_pwd="", minVersion="",
6 mapFile=None, messageFile=None, persist=0 ):
5 self.id = id 7 self.id = id
6 self.name = name 8 self.name = name
7 self.desc = desc 9 self.desc = desc
8 self.minVersion = minVersion 10 self.minVersion = minVersion
9 self.messageFile = messageFile 11 self.messageFile = messageFile
31 33
32 def add_player(self,id): 34 def add_player(self,id):
33 self.players.append(id) 35 self.players.append(id)
34 36
35 def remove_player(self,id): 37 def remove_player(self,id):
36 if self.voice.has_key(id): 38 if self.voice.has_key(id): del self.voice[id]
37 del self.voice[id]
38 self.players.remove(id) 39 self.players.remove(id)
39 40
40 def get_num_players(self): 41 def get_num_players(self):
41 num = len(self.players) 42 num = len(self.players)
42 return num 43 return num
43 44
44 def get_player_ids(self): 45 def get_player_ids(self):
45 tmp = self.players 46 tmp = self.players
46 return tmp 47 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: 64 if v1<v2: return 1
65 return 1 65 if v1>v2: return 0
66 if v1>v2:
67 return 0
68 66
69 if len(minVersion)>len(version): 67 if len(minVersion)>len(version): return 0
70 return 0
71 return 1 68 return 1
72 69
73 #depreciated - see send_group_list() 70 #depreciated - see send_group_list()
74 def toxml(self,act="new"): 71 def toxml(self,act="new"):
75 # Please don't add the boot_pwd to the xml, as this will give it away to players watching their console 72 # Please don't add the boot_pwd to the xml, as this will give it away to players watching their console