RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

"I have no idea what's going on..."

Booshnig

Sorceror
"I have no idea what's going on..."


I'm sure some of you remember me babbling on the forums about this before. I kind of went on hold, for a few... months... But now that I've reformatted again, I'm hoping to get RunUO running.
So - I've come to a few conclusions since my last post - The problem here is, that every time I get to the "create a character" screen, UO freezes. RunUO stays fine, but the UO client freezes (hence the 1 to 0 online). Mark from the UOGamers team informed me that it was because of my serverlist.cs, but upon further investigation, that was not the issue.
I basically have my cable modem set up in the Ethernet port and the USB port, which is why I think I have so many IP's there. Before I started having these problems, my cable modem was ONLY connected through the USB port, and it never gave me any problems., (I've tried installing withought the ethernet afterwards and it doesn't work).

The strange thing is... Other people can connect to my server Perfectly Fine, except for me. Which is starting to make me think it's because the server's hosted on my own comp. =(
Then again, I'm not necessarily the best "computer haxxorer" in the world. If anyone could help me with this, it'd be greatly appreciated.
 

Booshnig

Sorceror
using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put

in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public const string Address = "68.33.23.116";

public const string ServerName = "RunUO Test Center";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(),

out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{
try
{
outValue = IPAddress.Parse( addr );
return true;
}
catch
{
try
{
IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;
IPHostEntry iphe = Dns.Resolve( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList );

return contains;
}
}
}
 

Booshnig

Sorceror
My cable modem's only connected to ONE computer, but it's connected through two slots, the USB and the Ethernet.
What confuses me is that the only part where it has trouble is during character selection. The shard connects fine, then the client crashes at character selection. (all other shards I play on work fine though)
 

Sep102

Page
Have you tried making that value null (I think, not too sure here), then connecting? Just wondering if it lets you through the way it lets people with routers in who can't connect while their ip address is in there.
 

pauln375

Sorceror
I am lost

I am haveing kinda the same trouble in the above picture but I can connect from any computer in my house but not from outside I see players conect then disconect just like the picture above. Here is my serverlist also I know it is not a firewall causeing me grief because even without it I have trouble hopefully I just missed something simple benn two weeks of headache and I think I have lost my players now any help is greatly appreciated

Code:
[size=2]using System;

using System.Net;

using System.Net.Sockets;

using Server;

using Server.Network;

namespace Server.Misc

{

public class ServerList

{

/* Address:

* 

* The default setting, a value of 'null', will attempt to detect your IP address automatically:

* private const string Address = null;

* 

* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:

* private const string Address = "24.247.163.235";

* 

* If you need to resolve a DNS host name, you can do that too:

* private const string Address = "24.247.163.235";

*/

public const string Address = null;

public const string ServerName = "Abryn";

public static void Initialize()

{

Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );

}

public static void EventSink_ServerList( ServerListEventArgs e )

{

try

{

IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )

e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );

else

e.Rejected = true;

}

catch

{

e.Rejected = true;

}

}

public static bool Resolve( string addr, out IPAddress outValue )

{

try

{

outValue = IPAddress.Parse( addr );

return true;

}

catch

{

try

{

IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )

{

outValue = iphe.AddressList[iphe.AddressList.Length - 1];

return true;

}

}

catch

{

}

}

outValue = IPAddress.None;

return false;

}

private static bool IsLocalMachine( NetState state )

{

Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )

return true;

bool contains = false;

IPHostEntry iphe = Dns.Resolve( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )

contains = theirAddress.Equals( iphe.AddressList[i] );

return contains;

}

}

}

[/size]
 

Sep102

Page
Well, if you're behind a router, simplest fix is to try mr.fixits sweet serverlist.cs, otherwise, have you tried changing this
Code:
public const string Address = [B]null[/B];
to your IP address?
 

pauln375

Sorceror
Sep102 said:
Well, if you're behind a router, simplest fix is to try mr.fixits sweet serverlist.cs, otherwise, have you tried changing this
Code:
public const string Address = [b]null[/b];
to your IP address?
Ok first I want to thank you for the help it fixed my problem I am not behind a router Second
I want to ask why my ip address had to be there now and never before the only thing that has changed in the last month was my ip when i moved and I put that in same as always but then like two weeks later started getting nasty letters from players lol see most of my players are from poland ime in us they come on while ime asleep and I was able to get in on any computer in my house so the problem went unaddressed and aqgain thank you thank you
 
J

Jimbot

Guest
Dude connecting a modem in usb and eathernet at the same time is a majer no no it screws up your net and your pc did you not read your modem instuctions
 

Phantom

Knight
Jimbot said:
Dude connecting a modem in usb and eathernet at the same time is a majer no no it screws up your net and your pc did you not read your modem instuctions

Your a dumbass...

You know nothing, so don't tell people its a major "no no" as you put it.

pauln375

You have a router, you clearly don't know it.
 

pauln375

Sorceror
My modem plugs direct to server

Phantom said:
Your a dumbass...

You know nothing, so don't tell people its a major "no no" as you put it.

pauln375

You have a router, you clearly don't know it.
They did give me a diferent type of modem than before is it possible it is seing the modem as a router hmm dont take me wrong please ime not questioning you just curios Well thank you all for the help Just glad to see my players online again and no nasty emails
 
Top