Master server

What is the master server of ET? I guess it's still quake. Can anyone post the IP/connection information here plox.

Thank you.
Comments
6
public static ET [] GetServerListET()
{
// Create a new UPD Client
TimedUdpClient udp = new TimedUdpClient();

// Set the time out to 500 Ms
udp.Timeout = 500;

// New IPAddress variable
IPAddress ip;

// Assign value to IP & Port vars, resolve the address to it's IP
ip = Dns.Resolve("etmaster.idsoftware.com").AddressList[0];
int port = 27950;

// Create a new IPEndPoint variable for receiving data
IPEndPoint remote;

// Assign new arraylist
ArrayList servers = new ArrayList();

// Set the server variable
remote = new IPEndPoint(ip,port);

// form the query
byte[] query = Encoding.Default.GetBytes("ÿÿÿÿgetservers 83 empty full");

// Send the query to the ET Masterserver
udp.Send(query,query.Length,remote);

// Create a variable to put the answer in
string answer = "";

// We'll receive the answer in bytes, we'll stick it in a byte array
byte[] receive = null;

do
{
// Put the received data into the byte array "receive"
receive = udp.Receive(ref remote);

// Turn received byte array into a string "answer"
if (receive!=null)
answer += Encoding.Default.GetString(receive);

// Set conditions for ending the loop
} while (receive!=null);

// Remove the "ÿÿÿÿgetserversResponse\" en "EOT" from the answer string
answer = answer.Replace("ÿÿÿÿgetserversResponse\\", "");
answer = answer.Replace("EOT", "");

// Splitanswer is an array, it's strings contain the ip & ports
string[] SplitAnswer = answer.Split(new char[] {'\\'});

// Get the individual ip's & ports
foreach (string b in SplitAnswer)
{
// Make sure the data is valid, if it isn't you'll get an index error
if (b.Length == 6)
{
// j4n to the resque !! Bytes !
byte[] bIp = System.Text.Encoding.Default.GetBytes(b);
int getport = (bIp[4] * 256) + bIp[5];

string strIP = string.Concat(bIp[0].ToString(), ".", bIp[1].ToString(), ".", bIp[2].ToString(), ".", bIp[3].ToString());

// Add the server
ET efserver = new ET(strIP,getport);

servers.Add(efserver);
}
}

// Using an array to store all server ips & ports
ET [] serverArray = new ET[servers.Count];

for (int x=0; x<servers.Count; ++x)
{
serverArray[x] = (ET)servers[x];
}

// Close the UDP connection
udp.Close();

// return serverlist
return serverArray;
}
Thanks u!!!!!!!!!!!!
Parent
haha nice :D
Parent
192.168.1.1
Back to top