Register for your free account! | Forgot your password?

You last visited: Today at 13:39

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

Advertisement



[Release] Ban Selected IP's

Discussion on [Release] Ban Selected IP's within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
[Release] Ban Selected IP's

Here you may stop unwanted ips from getting into your server (LOTF) since the majority are using it,
Yes you may not need it but eh i might aswell release it XD

In your release/debug folder make a txt doc where the ips will be stored

Now in General.cs find public static
Code:
System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"ServerLog.txt", true);
Replace with
Code:
public static string BannedIP = System.IO.File.ReadAllText(Application.StartupPath + @"IPTEXTFILLYOUMADE.txt");
System.IO.StreamWriter(Application.StartupPath + @"ServerLog.txt", true);
Change IPTEXTFILLYOUMADE.txt to the txt file you made in your debug/release
Now in General.cs again find the AuthPacket void
Search for
Code:
 
if (Auth != 0)
                        {
General.WriteLin(blahblah)
Replace with
Code:
 if (Auth != 0)
                        {
                            if (BannedIP.Contains(Ip))
                            {
                                Sock.Disconnect(true);
                            }
                            General.WriteLine("Successful login for Account " + ":" ThisAcc + "-IP-" + Ip);
Please comment, iv been awake for 3 days in a row so theres bound to be some spelling errors XD
Ultimatum is offline  
Thanks
19 Users
Old 09/12/2008, 19:40   #2
 
glupkotrup's Avatar
 
elite*gold: 0
Join Date: May 2007
Posts: 1,195
Received Thanks: 457
Nice You earned one thanks
glupkotrup is offline  
Old 09/12/2008, 19:51   #3
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
Thanks for the comment =D Well.. the thanks =o
Ultimatum is offline  
Old 09/12/2008, 20:06   #4
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Great contribution!
Thanks

Emme
_Emme_ is offline  
Old 09/12/2008, 20:14   #5
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
HOW TO:

If you want to say IP Ban someone, check the ServerLog for there acc, General.WriteLine("Successful login for account " + ThisAcc + "-IP-" + Ip); will show lets say
"Successfull login for account Ultimatum -IP- 81.934.392.12" <--- youll find something like that

Put 81.934.392.12 in the IPBanning txt doc in debug/release and your done, ip = denied =)
Ultimatum is offline  
Old 09/12/2008, 20:15   #6
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Yeah,didnt read through whole post. Sorry and thanks
_Emme_ is offline  
Old 09/12/2008, 20:19   #7
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
edit :

Now it throws an error message,like an exeption error. Any ideas?
_Emme_ is offline  
Old 09/12/2008, 20:32   #8
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
UPDATED
Ultimatum is offline  
Old 09/12/2008, 21:33   #9
 
glupkotrup's Avatar
 
elite*gold: 0
Join Date: May 2007
Posts: 1,195
Received Thanks: 457
@Emme "Edit:" is for edited post and you just wrote another one -_-
@Ultimatum So nice
glupkotrup is offline  
Old 09/12/2008, 22:27   #10
 
taguro's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
Awesome release, thanks alot.
taguro is offline  
Thanks
1 User
Old 09/12/2008, 22:43   #11
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Nice job!
YukiXian is offline  
Old 09/12/2008, 23:24   #12
 
elite*gold: 0
Join Date: Jun 2007
Posts: 323
Received Thanks: 30
Eh n1
Zanzibar is offline  
Old 09/13/2008, 16:40   #13
 
elite*gold: 0
Join Date: Feb 2008
Posts: 240
Received Thanks: 10
okay for this General.WriteLine("Successful login for Account " + ":" ThisAcc + "-IP-" + Ip); okay for ThisAcc it wants me to make it ) and in ip); it wants me to take away the ) what should i do just do that lol
Bottingpunk is offline  
Old 09/13/2008, 19:58   #14
 
Mouse>Pro's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 142
Received Thanks: 89
nice
Mouse>Pro is offline  
Old 09/13/2008, 20:46   #15
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
Quote:
Originally Posted by Bottingpunk View Post
okay for this General.WriteLine("Successful login for Account " + ":" ThisAcc + "-IP-" + Ip); okay for ThisAcc it wants me to make it ) and in ip); it wants me to take away the ) what should i do just do that lol
If i could understand wtf your talking about i may be able to help o.0
Ultimatum is offline  
Reply


Similar Threads Similar Threads
[HTML/CSS] Frage: Navigation Hover/Selected/Selected Hover
08/28/2010 - Web Development - 1 Replies
Hallo zusammen. Ich bin gerade dabei ein Wordpress Layout umzusetzen und habe in Photoshop eine schicke Navigation gebastelt. Ich habe 5 Navipunkte, jedoch soll später im design unterschieden werden zwischen: Normal, Hover, Selected und Selected Hover. Einen einfachen Hovereffekt konnte ich ganz einfach erzeugen mit: <a href="http://lalala.lala/"><img src="http://localhost/wordpress/wp-content/th emes/eskapism/images/home.png"></a> <img...
Selected my picture
08/23/2009 - Silkroad Online - 9 Replies
Finally, I selected the picture. ^ ^:pimp: http://img149.imageshack.us/img149/2499/asdasdm.p ng
need auto selected for sjsro
03/21/2009 - SRO Private Server - 7 Replies
plz enyone can make me or give me if you have plz
agbot is attacking party when they are not selected
01/16/2009 - Silkroad Online - 11 Replies
in config mormal, berserk ready, and berserk mode all dont have the option to attack party monsters but he still does. can any one help?
ANI Quality Editor - Display selected DDS
07/25/2008 - CO2 Exploits, Hacks & Tools - 530 Replies
Note: about token, u can check COnights solution: http://www.elitepvpers.com/forum/co2-exploits-hack s-tools/108785-ani-quality-editor-display-selected -dds-47.html#post1252439 and remember some new patches will overwrite the edit one, so it is recommended that u drop some items to check if it still work every new patches downloaded if not, well, just run the program again, it doesnt take much time now =) http://img.photobucket.com/albums/v439/evanxxxm/t emp/Untitled-1-5.jpg



All times are GMT +1. The time now is 13:42.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.