Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Network Modifications

Network Modifications This forum is for modifications to the networking code of RunUO

Closed Thread
 
Thread Tools Display Modes
Old 01-25-2005, 02:39 PM   #1 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default Fix for disconnect showing 1 too many users online.

I have noticed that when a user disconnects from the shard it always shows 1 more user online than there is after the disconnect. This is an easy fix:

On line 721 and 723 in Netstate.cs (from the core) is where these messages are displayed. Replace this:

Code:
if ( ns.m_Account != null )
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online] [{2}]", ns, m_Instances.Count, ns.m_Account );
else
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online]", ns, m_Instances.Count );
With this:

Code:
if ( ns.m_Account != null )
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online] [{2}]", ns, (m_Instances.Count - 1), ns.m_Account );
else
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online]", ns, (m_Instances.Count - 1) );
__________________
HI!
jjarmis is offline  
Old 01-25-2005, 03:38 PM   #2 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,761
Default

Great. I'll put it in and try it out soon. Thanks for the mod.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline  
Old 01-25-2005, 03:40 PM   #3 (permalink)
Forum Administrator
 
krrios's Avatar
 
Join Date: Aug 2002
Posts: 2,850
Default

Oops, thanks.
krrios is offline  
Old 01-25-2005, 04:19 PM   #4 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

Heh, no prob. I figured it was just a slight oversight.
__________________
HI!
jjarmis is offline  
Old 01-28-2005, 05:32 PM   #5 (permalink)
Forum Newbie
 
stooge's Avatar
 
Join Date: Dec 2004
Location: Moronica
Age: 35
Posts: 99
Default

Quote:
Originally Posted by jjarmis
I have noticed that when a user disconnects from the shard it always shows 1 more user online than there is after the disconnect. This is an easy fix:

On line 721 and 723 in Netstate.cs (from the core) is where these messages are displayed. Replace this:

Code:
if ( ns.m_Account != null )
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online] [{2}]", ns, m_Instances.Count, ns.m_Account );
else
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online]", ns, m_Instances.Count );
With this:

Code:
if ( ns.m_Account != null )
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online] [{2}]", ns, (m_Instances.Count - 1), ns.m_Account );
else
	Console.WriteLine( "Client: {0}: Disconnected. [{1} Online]", ns, (m_Instances.Count - 1) );
I was having the same issue. I haven't really had a chance to mess around with the core. I'll figure out how to edit my Core later tonight. In the meanwhile, I'd like to know if this issue is causing any damage to my server or any other files? In other words does it need ot be fixed ASAP or can it wait until I have more time to read up on core modifications?
__________________
POTS,
stooge™

Amalgamated Association of Morons - Local 6⅞
"For Duty & Humanity!"


________________________________

Heed these words... (click here)
stooge is offline  
Old 01-28-2005, 05:33 PM   #6 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,761
Default

What jjarmis posted is the fix for it. It's clearly not damaging, but it's a nuisance that's easily solvable.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline  
Old 01-28-2005, 05:55 PM   #7 (permalink)
Forum Newbie
 
stooge's Avatar
 
Join Date: Dec 2004
Location: Moronica
Age: 35
Posts: 99
Default

Quote:
Originally Posted by Khaz
What jjarmis posted is the fix for it. It's clearly not damaging, but it's a nuisance that's easily solvable.
I understand that that is the fix. I misunderstood when he said "core" fix. I actually thought I'd have to download the open source of the core and edit somethg there. I can't find NetState.cs in my RunUO folder. I did a search.

Edit:
I downloaded the Source Code and unzipped it and found NetState.cs. of course.
Now it's time for me to read up on how to edit/recompile it all after I make the fix.
Thanks again.
__________________
POTS,
stooge™

Amalgamated Association of Morons - Local 6⅞
"For Duty & Humanity!"


________________________________

Heed these words... (click here)
stooge is offline  
Old 02-04-2005, 12:51 PM   #8 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

I have no clue how to edit the core, so can someone send me a working version?
sidphoenix is offline  
Old 02-04-2005, 05:52 PM   #9 (permalink)
Master of the Internet
 
Quantos's Avatar
 
Join Date: Apr 2003
Location: Edmonton, AB
Age: 41
Posts: 6,867
Send a message via ICQ to Quantos Send a message via AIM to Quantos Send a message via MSN to Quantos Send a message via Yahoo to Quantos
Default

It's a violation of the EULA for anyone to send you the files. You are better off waiting for the next release if you (like some of us) don't want to recompile the core.
__________________
Paranoia is what happens when you finally have all of the facts.
Quantos is offline  
Old 02-04-2005, 05:54 PM   #10 (permalink)
Forum Newbie
 
stooge's Avatar
 
Join Date: Dec 2004
Location: Moronica
Age: 35
Posts: 99
Default

Quote:
Originally Posted by sidphoenix
I have no clue how to edit the core, so can someone send me a working version?
Will RunUO 1.0.1 have the fix?
__________________
POTS,
stooge™

Amalgamated Association of Morons - Local 6⅞
"For Duty & Humanity!"


________________________________

Heed these words... (click here)
stooge is offline  
Old 02-04-2005, 05:56 PM   #11 (permalink)
Master of the Internet
 
Quantos's Avatar
 
Join Date: Apr 2003
Location: Edmonton, AB
Age: 41
Posts: 6,867
Send a message via ICQ to Quantos Send a message via AIM to Quantos Send a message via MSN to Quantos Send a message via Yahoo to Quantos
Default

Assuming that I interpreted Krrios' post correctly, then yes it will be in the next release.
__________________
Paranoia is what happens when you finally have all of the facts.
Quantos is offline  
Old 02-04-2005, 09:27 PM   #12 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Wow, quick to jump down my throat are we? If I knew a moderator would get pissy about people sending me files, I wouldnt of brought it up. But hey, how can you make sure nobody sends me files? I mean, cant someone IM me and send it to me from there?

Just a thought.
sidphoenix is offline  
Old 02-04-2005, 09:29 PM   #13 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

That is like asking how software companies can stop people from pirating their software. Just because it is easy to do doesn't mean it isn't illegal.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:30 PM   #14 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Well I am just saying, why is it illegal to have someone edit the core for me and send me the update? It would just be helping me out. Its not like hes giving me $1,000 worth the software here....
sidphoenix is offline  
Old 02-04-2005, 09:32 PM   #15 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

Because it is against the EULA read it, live by it, and you wont get sued. ^_^ Just because the program is free for you to use doesn't mean it is free for you to do whatever you want with.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:33 PM   #16 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

So let me get this straight. I (myself) can make changes, but nobody can make changes and give me the updated changes?
sidphoenix is offline  
Old 02-04-2005, 09:34 PM   #17 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

Exactly, because that would be redistrabution of a modified core, which if you READ the EULA is illegal.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:36 PM   #18 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Well hes not redistributing it to me, im sending the core to someone, the other person will make the change and give it back. Its not distribution, its editing it. I wouldnt be giving it to others...
sidphoenix is offline  
Old 02-04-2005, 09:41 PM   #19 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

doesn't matter, it is still redistrabution, whether one or a thousand download it.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:42 PM   #20 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Okay, say that I hire someone to my shard, and give him FTP access to my folder that has the core. Technically hes not downloading the core, hes updating the files on my computer though FTP. Or, if he uses a program like AnywherePC and uses my screen to make changes. Technically thats "legal" isnt it?
sidphoenix is offline  
Old 02-04-2005, 09:55 PM   #21 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

NO, no matter how you try to sidestep it, it is still redistrabution. If someone edits the core, then gives it to someone else in any way shape or form, that is redistrabution.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:57 PM   #22 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Technically hes not distributing it to me though. If a guy comes to my house and edits it on my computer, its not redistribution. Its helping! Ok ok ok, how about this, I get someone to come over, and tell me exactly what to put on what line, pointing me the whole way though. Would that be distribution too?
sidphoenix is offline  
Old 02-04-2005, 09:58 PM   #23 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

Well, what do you think I did in the very first post of this thread?

Make the mods yourself, recompile yourself. That is the point of posting here.
__________________
HI!
jjarmis is offline  
Old 02-04-2005, 09:59 PM   #24 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Sigh...You should brush up on your legal work man.
sidphoenix is offline  
Old 02-04-2005, 10:00 PM   #25 (permalink)
 
Join Date: Jul 2003
Posts: 59
Send a message via AIM to sidphoenix Send a message via Yahoo to sidphoenix
Default

Sigh...

Would it be "illegal" if I had a chimp do it for me? Or does the EULA apply to other species as well...
sidphoenix is offline  
Closed Thread

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