The online racing simulator
Connection Ip to InSim
Hello. I was wondering is it possible to get ip to cruise InSim who connected to server? For example I write command !UserIP S2 and it shows his ip.

Thanks
You can get players' IPs from the server log but not via InSim.
I guess if the InSim application was on the same server as the LFS Host then, as long as you knew the file system you could parse the logs and find out who has what IP address.
I've been working on something very similar for WKD

i have mine working but i wanted to know if anybody could help optimize the code

#region ' Get IP String '
static public string GetIPString(string Username)
{

string file = globalVars.globalserverlog;
StreamReader Sr = new StreamReader(file);
if (Sr.BaseStream.Length > 4096)
{
Sr.BaseStream.Seek(-4096, SeekOrigin.End);
}
string line = null;
while ((line = Sr.ReadLine()) != null)
{
if (line.Contains("Authorised : "))
{
int index1 = line.LastIndexOf("(" + Username + ")", StringComparison.OrdinalIgnoreCase);
if (index1 != -1)
{
string Msg = line;
Sr.Close();
return line.Substring(index1 - 15);
}
}
}
Sr.Close();
return "";
}

Not the best code but i chucked it together quickly

FGED GREDG RDFGDR GSFDG