Register for your free account! | Forgot your password?

You last visited: Today at 01:16

  • 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: 210
Received Thanks: 42
IP Ban in 5165

I cannot for the life of me get it implemented

Any help?



majick is offline  
Old   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 755
Received Thanks: 531
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   #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   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 314
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



« Previous Thread | Next Thread »

Similar Threads
Hi I need 5165 source act like Real Co 5165
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...
4 Replies - CO2 PServer - Discussions / Questions
[5165] NPC help
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...
8 Replies - CO2 PServer - Discussions / Questions
need help 5165
i need code alex 2 rb full plz for 5165:)
3 Replies - CO2 PServer - Discussions / Questions
[Help]5165
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...
0 Replies - CO2 PServer - Discussions / Questions
about 5165
i need leveling is normal not fast i take level 137 in 20 mint only
2 Replies - CO2 PServer - Discussions / Questions



All times are GMT +1. The time now is 01:16.


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

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