Register for your free account! | Forgot your password?

You last visited: Today at 06:06

  • Please register to post and access all features, it's quick, easy and FREE!


IP Ban in 5165

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2006
Posts: 211
Received Thanks: 42
IP Ban in 5165

I cannot for the life of me get it implemented

Any help?



majick is offline  
Old 12/21/2009, 09:20   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 762
Received Thanks: 539
First of all...you need to parse the IP from the connected socket, then check if it's in a banned list(that you should have) and if it does put socket.Disconnect(false);


-impulse- is offline  
Old 12/21/2009, 15:19   #3
 
elite*gold: 0
Join Date: Nov 2009
Posts: 129
Received Thanks: 45
Quote:
Originally Posted by -impulse- View Post
First of all...you need to parse the IP from the connected socket, then check if it's in a banned list(that you should have) and if it does put socket.Disconnect(false);
RemoteEndPoint.ToString().Split(':')[0];
~Falcon is offline  
Thanks
2 Users
Old 12/21/2009, 15:31   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 318
Code:
// Read the ips from a file, text file or whatever you like to use if you are going to use other database types then you are on your own
string[] BannedClients = File.ReadAllText(<banned ips list path>).Split('\r', '\n');
// Iterate through the array
foreach(string Client in BannedClients)
{
     if(<Socket refrence name>.RemoteEndPoint.ToString().Split(':')[0] == Client)
           <Socket refrence name>.Disconnect(false);
    // Then if you have a list of clients or whatever which you should have then you should remove the client from the List<T> or Dictionary<T Key, T Value>
}
Nullable is offline  
Thanks
2 Users
Reply



« help | LoveStone Problem »

Similar Threads
Hi I need 5165 source act like Real Co 5165
09/15/2010 - CO2 PServer - Discussions / Questions - 4 Replies
I need a A source 5165 that all skills is available specially rb char like nin-nin-nin counterKill and nin-war-nin reflect and more, and also the attack rates should be fair not like +8 set can 1 hit +12 set, and also maybe the client, I need to...
[5165] NPC help
04/24/2010 - CO2 PServer - Discussions / Questions - 8 Replies
I've tried following a guide http://www.elitepvpers.com/forum/co2-pserver-guides-releases/492901-release-how-code-decent-npc-npcs-txt-entry.html The NPC shows up on the map but doesn't say anything that im trying to get it to say, can someone help...
need help 5165
03/07/2010 - CO2 PServer - Discussions / Questions - 3 Replies
i need code alex 2 rb full plz for 5165:)
[Help]5165
02/08/2010 - CO2 PServer - Discussions / Questions - 0 Replies
Okay I know I know, I am a noob at coding and crap. So my problems are... 1. Invalid jump -.- so gay, it wont let me disconnect 2. i have all packets and shiz for breeder or whateva and the npcs still say "i dont have anything coded or whateva, my...
about 5165
02/07/2010 - CO2 PServer - Discussions / Questions - 2 Replies
i need leveling is normal not fast i take level 137 in 20 mint only



All times are GMT +2. The time now is 06:06.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.