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!

[Question] where do I change shard name?

Re: [Question] where do I change shard name?

volcy said:
where do I change shard name?

Scripts/Misc/ServerList.cs

using System;
using System.Net;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
public static void Initialize()
{
Listener.Port = 2593;

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

public static void EventSink_ServerList( ServerListEventArgs e )
{
IPHostEntry thisHost = Dns.Resolve( Dns.GetHostName() );
IPAddress[] addressList = thisHost.AddressList;

if ( addressList.Length > 0 )
{
//e.AddServer( "RunUO Test Center", new IPEndPoint( addressList[addressList.Length - 1], Listener.Port ) );

// If you're running behind a router, use the following line instead:
e.AddServer( "shard name", new IPEndPoint( IPAddress.Parse( "shard IP" ), Listener.Port ) );
}
else
{
e.Rejected = true;
}
}
}
}
 
Top