Logo Search packages:      
Sourcecode: maptransfer version File versions  Download package

def client::Gui::setup_servers (   self  ) 

Retrieve a server list and check for which game servers we have games
    in the selected account.

Definition at line 144 of file client.py.

00144                                :
            """ Retrieve a server list and check for which game servers we have games
                in the selected account.
            """
            
            self.cmbGameServer.clear()
            
            # Fetch the BaseURL - it returns something like this:
            # pub:cssource:Publicserver
            # war:cssource:Warserver
            # emp:Empires:EmpiresMod v3.1.3.3.7
            
            index = urlopen( self.baseurl ).fp
            
            while True:
                  line = index.readline().strip()
                  if not line:
                        break
                  srv, game, desc = line.split( ':', 2 )
                  if game in self.account_paths[self.current_account]:
                        self.cmbGameServer.addItem(
                              "%s (%s)" % ( desc, game ),
                              QtCore.QVariant( "%s:%s" % ( srv, game ) )
                              )
      
      server_info = property(


Generated by  Doxygen 1.6.0   Back to index