ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/python/guilds/guildboard.py
Revision: 1.1
Committed: Sun Feb 5 00:02:09 2006 UTC (18 years, 5 months ago) by root
Content type: text/x-python
Branch point for: UPSTREAM, MAIN
Log Message:
Initial revision

File Contents

# User Rev Content
1 root 1.1 import Crossfire
2     import CFGuilds
3    
4     def mycmp(a, b):
5     return cmp(a[1], b[1])
6    
7     activator=Crossfire.WhoIsActivator()
8     guilds = CFGuilds.CFGuildHouses()
9    
10     activator.Write('Guild Standings:')
11     activator.Write('Guild - Points - Status')
12    
13     guildlist = guilds.list_guilds()
14     standings = []
15     for guild in guildlist:
16     record = guilds.info(guild)
17     if record['Status'] != 'inactive':
18     standings.append([record['Points'], guild, record['Status']])
19     standings.sort(mycmp)
20     for item in standings:
21     activator.Write('%s - %s - %s' %(item[1],item[0],item[2]))