Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 04-12-2004, 03:24 AM   #1 (permalink)
 
Join Date: Mar 2004
Location: Kansas
Age: 47
Posts: 179
Send a message via ICQ to Chandral
Question Help!

When everyone tries to log onto my shard, they get a notice that it is down or something like that, yet I am able to log in myself. Any ideas on what could be causing this?

Thanks,
Chandral
Chandral is offline   Reply With Quote
Old 04-12-2004, 03:32 AM   #2 (permalink)
Forum Expert
 
icemallet's Avatar
 
Join Date: Aug 2003
Location: Canada
Posts: 816
Send a message via Skype™ to icemallet
Default

Do you have a router? If so did you port forward?Did you edit your severlist.cs?
The reason why you can only log in is because you are on LAN.
icemallet is offline   Reply With Quote
Old 04-12-2004, 03:44 AM   #3 (permalink)
 
Join Date: Mar 2004
Location: Kansas
Age: 47
Posts: 179
Send a message via ICQ to Chandral
Default

Quote:
Originally Posted by icemallet
Do you have a router? If so did you port forward?Did you edit your severlist.cs?
The reason why you can only log in is because you are on LAN.
Severlist.cs? How do I edit it, and yes, I am on a router and it is port forwarded.
Chandral is offline   Reply With Quote
Old 04-12-2004, 03:58 AM   #4 (permalink)
Forum Expert
 
icemallet's Avatar
 
Join Date: Aug 2003
Location: Canada
Posts: 816
Send a message via Skype™ to icemallet
Default

Here use this, just fill in the shard name, lan, and wan, I think phantom did this not sure, cant remeber:


Code:
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 = "wan ip here"; 

 public const string LocalServerAddress = "lan ip here";

 public const string ServerName = "Shard Name Here";

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

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

 public static void EventSink_ServerList( ServerListEventArgs e )
 {
  try
  {
   IPAddress ipAddr;
   IPAddress LocalAddress = IPAddress.Parse( LocalServerAddress );
   

   if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
   {
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
e.AddServer( "Local Server", new IPEndPoint( LocalAddress, 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;
 }
}
}
icemallet is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5