Synce i´ve had reply on how to connect to lobby server i could done the lobby string parser...
here´s the code
/*
* Lobby Received String Parser
*/
package lobby;
/**
*
* @author vEsP@
*
*/
public class Parser {
private static int token ;
public static ServerObject makeServer(String serverInfo) {
token = 0 ;
ServerObject server = null;
if (serverInfo.charAt(0) == 'g') {
// version parser
String version = getNext(token+2,serverInfo) ;
String ip = getNext(token+2, serverInfo) ;
String port = getNext(token+2, serverInfo) ;
String gamestyle = getNext(token+2, serverInfo) ;
String players = getNext(token+2, serverInfo) ;
String maxPlayers = getNext(token+2, serverInfo) ;
String map = getNext(token+2, serverInfo) ;
String name = getNext(token+2, serverInfo) ;
String bots = getNext(token+2, serverInfo) ;
String bonusFreq = getNext(token+2, serverInfo) ;
String respawn = getNext(token+2, serverInfo) ;
String connection = getNext(token+2, serverInfo) ;
String survival = getNext(token+2, serverInfo) ;
String realistic = getNext(token+2, serverInfo) ;
String dedicated = getNext(token+2, serverInfo) ;
String os = getNext(token+2, serverInfo) ;
String passworded = getNext(token+2, serverInfo) ;
String be = getNext(token+2, serverInfo) ;
String country = getNext(token+2, serverInfo) ;
server = new ServerObject
(version, ip, port, gamestyle, players, maxPlayers, map,
name, bots, bonusFreq, respawn, connection, survival,
realistic, dedicated, os, passworded, be, country) ;
}
return server ;
}
public static String getNext(int begin, String str) {
String result = "" ;
for (int i = begin; i<= str.length()-1; i++) {
token++ ;
if (str.charAt(i) == '©')
break ;
result += str.charAt(i) ;
}
return result ;
}
}