[Small release]Player limit

03/31/2010 19:30 Fish*#1
This is a simple and small release for lotf 5017 x.x
Is just for adding a player limit to your server, so it won't crash, when there gets too many players :handsdown:

Open client.cs and search for:
Code:
if (MyChar.MyGuild != null)
under the whole code paste:
Code:
                                        if (World.AllChars.Count >= 50 && Status != 8)
                                        {
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL.", 2011));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL.", 2500));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!!.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!!!.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!!!!.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!!!!!.", 2000));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "THE SERVER IS FULL!!!!!!.", 2000));
                                            MyChar.MyClient.Drop();
                                        }
Then the players will get disconnected, when they try to login, cause the server is full.
Is a LOL code?
03/31/2010 20:07 Basser#2
I'm not sure why someone would use this, but anyway nice release.
Looks good.
03/31/2010 22:32 Fish*#3
Cuz all those who takes the public sources can not hold many players, so the server will crash for them if there gets too many players ^^ so with this there won't be that problem XD
how ever it could be done with a packet that sends the message client way.
But this is just da simple way :P
03/31/2010 22:44 gad-legion#4
pserv owner know the use of it , nice release
03/31/2010 22:47 Fish*#5
Quote:
Originally Posted by gad-legion View Post
pserv owner know the use of it , nice release
know the use of what and thanks ^^
03/31/2010 23:46 .Guru#6
why not recode the socket? or better yet since i assume you don't know how, use infamous's socket so that the limit doesn't have to be low. 5165 source barely holds 50, i imagine lotf barely holds 20 clients before crashing. good sockets = more players, hell thats why immune has sockets that hold up to 400 clients before crashing. most likely 400 players won't play on a public sourced server, 'most likely' ..binaries are a different story.
04/01/2010 00:01 Fish*#7
Quote:
Originally Posted by p s y k h d View Post
why not recode the socket? or better yet since i assume you don't know how, use infamous's socket so that the limit doesn't have to be low. 5165 source barely holds 50, i imagine lotf barely holds 20 clients before crashing. good sockets = more players, hell thats why immune has sockets that hold up to 400 clients before crashing. most likely 400 players won't play on a public sourced server, 'most likely' ..binaries are a different story.
yeah i know, i just meant. Not everybody can recode the sockets XD
however my source is stable (untill now)
04/01/2010 01:55 PeTe Ninja#8
no....

go to where they actually do strt to login

... check out ym old ip ban release at the same line do like

|| World.AllChars.Count > 20)
Socket.Disconnect();
return;

disconnects before they even login ><
04/01/2010 02:09 N”ghtMare ?? WooT#9
good
04/01/2010 06:39 -NewDawn-#10
Quote:
Originally Posted by Hepatitis X View Post
I'm not sure why someone would use this, but anyway nice release.
Looks good.
#reported
Remove our private conversation Hepatitis. I told you how inappropriate that is. I don't even know who you are and why you're doing this. Respond in the message I sent you- not on a public thread. I'm just apologizing to the community for his inappropriate behavior Hepatitis is demonstrating. Please keep flames a private matter.

@OP, nice job. I'm glad to see that there are people out there that are thinking of the unexpected. Nice work ^^ I'm not going to use it until it becomes an issue but I will give you thanks =] Just cause you deserve it bro. Good luck on your server! ^^,
04/01/2010 07:11 Fish*#11
Quote:
Originally Posted by -NewDawn- View Post
#reported
Remove our private conversation Hepatitis. I told you how inappropriate that is. I don't even know who you are and why you're doing this. Respond in the message I sent you- not on a public thread. I'm just apologizing to the community for his inappropriate behavior Hepatitis is demonstrating. Please keep flames a private matter.

@OP, nice job. I'm glad to see that there are people out there that are thinking of the unexpected. Nice work ^^ I'm not going to use it until it becomes an issue but I will give you thanks =] Just cause you deserve it bro. Good luck on your server! ^^,
Thanks, but im sure he talked to my thread and about that nobdies gonna use it, but i thought peoples would cuz it can make the crash lower, if they stop players to enter server XD ^^

@.Ocularis
OK OR NO YAS MENG I NED ASTF MENG OK OR NO?
:facepalm:
04/01/2010 11:35 Basser#12
I didnt say nobody would use this, I personally didn't understand why you released it, but I do now, we'll done! anyway I think recodinv THE socket system would be easy, doubling THE amount of players, And more than that is also possible, but Will be ą littleharder. Sorry for typos, Im on my iPhone
04/01/2010 12:02 Fish*#13
Quote:
Originally Posted by Hepatitis X View Post
I didnt say nobody would use this, I personally didn't understand why you released it, but I do now, we'll done! anyway I think recodinv THE socket system would be easy, doubling THE amount of players, And more than that is also possible, but Will be ą littleharder. Sorry for typos, Im on my iPhone
i tried, but failed LAWL.
I thought it was more stable, but still not :S
Can hold 10players now LOL.
so i'll try again unleast i find something x.x
04/01/2010 15:52 Nullable#14
A nice tutorial: [Only registered and activated users can see links. Click Here To Register...]
04/01/2010 18:22 ChingChong23#15
What source are you using that can't get past 10 players? and what exactly happens? server crash? if so can you print out the errors?