Mercurial > ~darius > hgwebdir.cgi > scrape-gm
comparison scrape-gm.py @ 7:825302e32c35
Print out the server IP & port tuple as well as the name.
author | darius@inchoate.localdomain |
---|---|
date | Wed, 21 Nov 2007 11:57:40 +1030 |
parents | 5058c2695109 |
children | fbaf34d7bab7 |
comparison
equal
deleted
inserted
replaced
6:5058c2695109 | 7:825302e32c35 |
---|---|
76 def __str__(self): | 76 def __str__(self): |
77 plist = "" | 77 plist = "" |
78 for p in self.players: | 78 for p in self.players: |
79 plist = plist + " " + str(p) | 79 plist = plist + " " + str(p) |
80 | 80 |
81 return "%s | Map: %s | Players: %d/%d : %s (%s old)" % \ | 81 return "%s (%s:%d) | Map: %s | Players: %d/%d : %s (%s old)" % \ |
82 (self.description, self.mapname, self.numplayers, self.maxplayers, \ | 82 (self.description, self.ip, self.port, self.mapname, |
83 plist, self.updateage) | 83 self.numplayers, self.maxplayers, plist, |
84 self.updateage) | |
84 | 85 |
85 def GetTuple(scols): | 86 def GetTuple(scols): |
86 return str(scols[2]) + ":" + str(scols[3]) | 87 return str(scols[2]) + ":" + str(scols[3]) |
87 GetTuple = staticmethod(GetTuple) | 88 GetTuple = staticmethod(GetTuple) |
88 | 89 |