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!

2.0 and vista

Raider

Wanderer
mordero;653839 said:
other than the invalid passwords, that looks like mine.

And you need to make sure you have an IP specified in you ServerList.cs in the distro scripts.
Hey mordero SVN is now 176 and they changed some lines on Listener.cs
can you please check it out to see how you can make it work for windows vistas the lines code are changed different.
as you see its different now so not sure how to add the IPv6 you edited on this one heres part of code on Listener.cs
Code:
/***************************************************************************
 *                                Listener.cs
 *                            -------------------
 *   begin                : May 1, 2002
 *   copyright            : (C) The RunUO Software Team
 *   email                : [email protected]
 *
 *   $Id: Listener.cs 174 2007-04-25 01:35:38Z mark $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using Server;

namespace Server.Network
{
	public class Listener : IDisposable
	{
		private Socket m_Listener;
		private bool m_Disposed;

		private Queue<Socket> m_Accepted;
		private object m_AcceptedSyncRoot;

		private AsyncCallback m_OnAccept;
		private AsyncCallback m_OnDisconnect;

		private static Socket[] m_EmptySockets = new Socket[0];

		private static int m_Port = 2593;

		public static int Port
		{
			get
			{
				return m_Port;
			}
			set
			{
				m_Port = value;
			}
		}

		public Listener( int port )
		{
			m_Disposed = false;
			m_Accepted = new Queue<Socket>();
			m_AcceptedSyncRoot = ((ICollection)m_Accepted).SyncRoot;
			m_OnAccept = new AsyncCallback( OnAccept );
			m_OnDisconnect = new AsyncCallback( OnDisconnect );

			m_Listener = Bind( IPAddress.Any, port );

			try
			{
				IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );

				Console.WriteLine( "Address: {0}:{1}", IPAddress.Loopback, port );

				IPAddress[] ip = iphe.AddressList;

				for ( int i = 0; i < ip.Length; ++i )
						Console.WriteLine( "Address: {0}:{1}", ip[i], port );
			}
			catch
			{
			}
		}

		private Socket Bind( IPAddress ip, int port )
		{
			IPEndPoint ipep = new IPEndPoint( ip, port );

			Socket s = SocketPool.AcquireSocket();

			try
			{
				s.LingerState.Enabled = false;
				s.ExclusiveAddressUse = false;

				s.Bind( ipep );
				s.Listen( 8 );

				IAsyncResult res = s.BeginAccept( SocketPool.AcquireSocket(), 0, m_OnAccept, s );

				return s;
 

mordero

Knight
Sure thing, I have an exam tomorrow night though, so I probably wont get a chance to look at it until then or Thursday.
 

mordero

Knight
Bah, ok, Ive taken a look at it, but something is going on with my computer :( so I have to figure out whatever it is before I can get this working.
 

Raider

Wanderer
mordero;677989 said:
Bah, ok, Ive taken a look at it, but something is going on with my computer :( so I have to figure out whatever it is before I can get this working.

Ah ok well i'll wait i will keep using SVN 173 till you can get this going Thank You.
 

Raider

Wanderer
Also i'm sure the RunUO Team is working on this issue for Windows Vista since you cant no longer buy latest computers with XP they all come with Vistas.
 

Jeff

Lord
Raider;686748 said:
Also i'm sure the RunUO Team is working on this issue for Windows Vista since you cant no longer buy latest computers with XP they all come with Vistas.
A true server shouldn't be using Vista in the 1st place.
 

Raider

Wanderer
Jeff;686749 said:
A true server shouldn't be using Vista in the 1st place.
I would say Very true at one time but not no more RunUO Will have to sooner or later make it compatible with vistas as i stated xp will be discontinue sooner or later cause if you go to a computer store to buy any latest new computers you wont find XP on them XP is history .
*PS* Also Windows vista is faster and better then Xp which ive noticed.
Thinks what happen to 95 and 98
NT and 2k
Gone.
 

Magnuson

Wanderer
Hi I am new to this thread and I have read and tried to understand the solution. I am not sure what you mean by distro scripts but i have found the serverlist.cs you were talking about and there it is:

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";
*/

private const string Address = "70.48.53.91 ";

public const string ServerName = "Shwartz!!";

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 )
{

if ( IPAddress.TryParse( addr, out outValue ) )
return true;

try
{
IPHostEntry iphe = Dns.GetHostEntry( 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.GetHostEntry( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList );

return contains;
}
}
}

Wich part do i replace with the code you have supplied in solution part 1?
And also where do i find listener.cs?

I know you've already dedicated some of your time to this issue but your help would be greatly appreciated.
 

wieganka

Sorceror
Jeff;686749 said:
A true server shouldn't be using Vista in the 1st place.

Very true, I agree...however, I do use my Vista machine as my development computer, and it would make testing easier to not have to copy files over to a different computer constantly.

That said, I don't expect Vista support, and have no problems modifying the core for my own use...I'll wait until RC2 though to even take a look at it.

Also, on a side note...you can "disable" IPV6 in Vista. I don't have the specifics at the moment, but all you have to do is go to Device Manager, and there are a couple driver items in there that you have to disable...I think it's the Teredo Tunneling Pseudo-Interface, and the WAN Miniport (IPV6) items. You might have to uncheck the "Internet Protocol Version 6 (TCP/IPv6) item in the Connection Properties of your network card...
 

Erica

Knight
Also, on a side note...you can "disable" IPV6 in Vista. I don't have the specifics at the moment, but all you have to do is go to Device Manager, and there are a couple driver items in there that you have to disable...I think it's the Teredo Tunneling Pseudo-Interface, and the WAN Miniport (IPV6) items. You might have to uncheck the "Internet Protocol Version 6 (TCP/IPv6) item in the Connection Properties of your network card...
Dont think thats going to help you run RunUO 2.0 Thought you will crash shard on vista on log on.
 

wieganka

Sorceror
Erica;721640 said:
Dont think thats going to help you run RunUO 2.0 Thought you will crash shard on vista on log on.

I do know, out of the box, RunUO 2 does not work on Vista...when RC2 comes out, I will be sure to check compatibility. Since the Client works fine on Vista, I think it is reasonable to assume that modifications can be made to the core to get it to work properly. I'm sure someone has done it somewhere...I haven't reeally looked much into it at the moment.
 

Erica

Knight
wieganka;721645 said:
I do know, out of the box, RunUO 2 does not work on Vista...when RC2 comes out, I will be sure to check compatibility. Since the Client works fine on Vista, I think it is reasonable to assume that modifications can be made to the core to get it to work properly. I'm sure someone has done it somewhere...I haven't reeally looked much into it at the moment.
You can make it run on Vista if you do a core modification heres a link on how to make it work on Vista.
http://www.runuo.com/forums/faq-forum/80923-getting-runuo-2-0-work-vista.html#post664020
 

wieganka

Sorceror
Erica;721653 said:
Nope read what Ryan says about Windows Vista just keep scrolling down till you see on the post Ryan made. heres the link.
http://www.runuo.com/forums/announcements/85419-runuo-update.html


I saw that, and agree with his findings, however, putting in the distro changes to support IPv6 isn't necessarily a "Vista Support Feature"...I mean, at the moment, yes, it would appear to be so...however, eventually IPv6 is going to be used more widespread - it's only a matter of time, and since the modification to support IPv6 itself is quick and easy and isn't really specific to Vista Support only...I don't see a reason why it would be left out.

Either way, it doesn't matter if they do or don't...that's why it's open source with a community to support it. :)
 

JSin666

Wanderer
mordero ... Ireally DONT understand man. Where ya find this "Core" file here? Listen.cs or listener.cs ... I did a full computer search and got nothing
 
Top