Mercurial > traipse_dev
comparison orpg/networking/mplay_groups.py @ 96:65c1604e7949 alpha
Traipse Alpha 'OpenRPG' {090924-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:
00:
Update forwards to the 090909-02 Server code that now works.
New default Lobby Map, designed for Traipse. Feel free to change it.
Updates to Server GUI:
* Admin can Ban from Backend.
* Prework to modify Ban List in back end.
* Server GUI finds your Lobby Name
* New users default as Lurker unless a Role is set
New Addition to Chat Die Roll commands. Math Ordering. Ex. [(X+Y)dZ]. Currently does pairs only, no nesting either.
Cleaner TraipseSuiteAttention portability and clean up in Main (Beta!)
author | sirebral |
---|---|
date | Thu, 24 Sep 2009 02:05:08 -0500 |
parents | d1aff41c031b |
children | 9314d63c0941 dcf4fbe09b70 |
comparison
equal
deleted
inserted
replaced
95:af6bf998f425 | 96:65c1604e7949 |
---|---|
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 |