|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Nov 2005
Age: 22
Posts: 17
|
ok i got help on UOGateway forums to tell me to edit around the serverlis.cs file. so i came here for help on what to do sicne UOG forums only deal with the Client and not Scripts so here i am ive edited around everything possible in my serverlist.cs file and im trying to make it so that people can connect to the shard and its not working so im in some Desperate need of help i will post what my Serverlist.cs file looks like now and can someone see waht i must change to get people to join up ive forwarded all my ports and on my firewall to so everythign should be fine well anyway heres what my serverlist.cs file looks like
Code:
using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;
namespace Server.Misc
{
public class ServerList
{
/* Address: "207.161.7.101";
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically: "207.161.7.101";
* private const string Address = "207.161.7.101";
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP: "207.161.7.101";
* private const string Address = "207.161.7.101";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "sob.forumup.com";
*/
public const string Address = "207.161.7.101";
public const string ServerName = "Shards of Blood";
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;
}
}
}
Code:
* If you need to resolve a DNS host name, you can do that too: * private const string Address = "sob.forumup.com"; |
|
|
|
|
|
#3 (permalink) |
|
Join Date: Nov 2005
Age: 22
Posts: 17
|
that doesnt really help me at all considering the fact that my ip in that file is the same as what it says in the Command Prompt any other editing wont dp anything i need to know what to add and how to or else i mscrwd over right now and thers nothign really i can do about it so please help me out here ive changed the IP now to my real computer s IP and its still messed up no one can get in so yea please help me out
Last edited by Trigin; 06-23-2006 at 09:45 PM. |
|
|
|
|
|
#5 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 45
Posts: 6,283
|
As I said. Checking your wide area network ip address is not something you can do from your command prompt in my admittedly small experience, which is why I suggested the website.
Since you seem to know for sure that I am incorrect, I can only assume that you should very easily be able to solve your own issue. |
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
|
If you are behind a router, then Malaperth is correct.
You cannot see your ip address unless you goto a website like www.whatsmyip.com. The IP address you see if you are behind a router in the command prompt is the address that your router assigned to your computer not the Wan IP. (which is what is needed here) From the ip you posted as being yours is 207.161.7.101... I believe that you are behind a router since the last value 101 is commonly assigned to the first connected computer on the router. However, if you do not have a router... You shouldn't have edited the IP address in the ServerList.cs The serverlist.cs you posted is from a distro RunUO 1.0. I recommend that you use Mr. Fixit's version of the Serverlist.cs Many people have found it has helped with clearing up connection issues greatly. Link: http://www.runuo.com/forums/showthre...+serverlist.cs Hope this helps you.
__________________
Ashlar, beloved of Morrigan Click here to goto a post containing links to each script i have released, each thread i have started and info about me. Last edited by Ashlar; 06-25-2006 at 01:38 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|