|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Jun 2006
Age: 21
Posts: 26
|
I welcome all. At me such problem, I RunUO disconnects all. It perceives only local Ip. And external disconecting. That to me with it to do prompt.RunUO to me gives out three Ip. The first 127.0.0.1 the Second my external Ip 195.238.189.197 and the third my local 10.0.11.27. When I come in UO it to me gives out:
Client:195.238.189.197 :Connecting.[1 Online] Login:195.238.189.197:Valid credentials for 'q' Client:10.0.11.27:Connecting.[2 Online] Client:195.238.189.197 : Disconecting.[1 Online] |
|
|
|
|
|
#2 (permalink) | |
|
Forum Expert
Join Date: Nov 2003
Location: The Internet
Age: 28
Posts: 3,510
|
Quote:
Please post your serverlist.cs file in code tages. |
|
|
|
|
|
|
#4 (permalink) | |
|
Newbie
Join Date: Jun 2006
Age: 21
Posts: 26
|
Quote:
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 = 195.238.189.197; * * 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 = "195.238.189.197"; * * 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 = null; public const string ServerName = "Land of Legends"; 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; } } } |
|
|
|
|
|
|
#5 (permalink) | ||
|
Forum Expert
Join Date: Nov 2003
Location: The Internet
Age: 28
Posts: 3,510
|
Quote:
Quote:
You put your address in a section of the code that is commented out. Code:
/* Address: * * The default setting, a value of 'null', will attempt to detect your IP address automatically: * private const string Address = 195.238.189.197; * * 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 = "195.238.189.197"; * * If you need to resolve a DNS host name, you can do that too: * private const string Address = "shard.host.com"; */ You need to edit the part below that part that says Code:
public const string Address = null; Code:
public const string Address = "195.238.189.197"; Last edited by stormwolff; 08-19-2007 at 10:18 AM. |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|