Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 06-26-2008, 04:09 PM   #1 (permalink)
Forum Novice
 
applepie's Avatar
 
Join Date: Feb 2004
Location: Da RoCK NC
Age: 19
Posts: 141
Send a message via AIM to applepie
Default Port Forwarding new Modem =(

ok i have recently got a wireless router which made my linksys no longer needed and i have acessed the port forward area of my modem but there are some new things i dont recognize ive attached an image any help would b GreAT!


here is my serverlist.cs


PHP 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 static readonly string Address "24.74.1.168";

        public const 
string ServerName "Illusions of Gaia";

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

            
EventSink.ServerList += new ServerListEventHandlerEventSink_ServerList );
        }

        public static 
void EventSink_ServerListServerListEventArgs e )
        {
            try
            {
                
IPAddress ipAddr;

                if ( 
ResolveAddress != null && !IsLocalMachinee.State ) ? Address Dns.GetHostName(), out ipAddr ) )
                    
e.AddServerServerName, new IPEndPointipAddrListener.Port ) );
                else
                    
e.Rejected true;
            }
            catch
            {
                
e.Rejected true;
            }
        }

        public static 
bool Resolvestring addrout IPAddress outValue )
        {

            if ( 
IPAddress.TryParseaddrout outValue ) )
                return 
true;

            try
            {
                
IPHostEntry iphe Dns.GetHostEntryaddr );

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

            
outValue IPAddress.None;
            return 
false;
        }

        private static 
bool IsLocalMachineNetState state )
        {
            
Socket sock state.Socket;

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

            if ( 
IPAddress.IsLoopbacktheirAddress ) )
                return 
true;

            
bool contains false;

            
IPHostEntry iphe Dns.GetHostEntryDns.GetHostName() );

            for ( 
int i 0; !contains && iphe.AddressList.Length; ++)
                
contains theirAddress.Equalsiphe.AddressList[i] );

            return 
contains;
        }
    }

Attached Images
File Type: jpg untitled.JPG (28.5 KB, 13 views)

Last edited by applepie; 06-26-2008 at 04:15 PM. Reason: added serverlist.cs
applepie is offline   Reply With Quote
Old 06-26-2008, 04:37 PM   #2 (permalink)
Forum Novice
 
applepie's Avatar
 
Join Date: Feb 2004
Location: Da RoCK NC
Age: 19
Posts: 141
Send a message via AIM to applepie
Default

Problem fixed
applepie 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