Register for your free account! | Forgot your password?

You last visited: Today at 00:12

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

Advertisement



[LOTF RELEASE] Ip Ban!!

Discussion on [LOTF RELEASE] Ip Ban!! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Lightbulb [LOTF RELEASE] Ip Ban!!

Ip Ban!

Credits to Ultimatum



First...Search this ( It is in General.cs )



Code:
        public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.txt", true);

and under it add...


Code:
public static string BannedIP = System.IO.File.ReadAllText(Application.StartupPath + @"\IPBanList.txt");
Next search for this ( Still in General.cs ( all of it is )

Code:
if (Auth != 0)
                        {
                            General.WriteLine("Successful login for account " + ThisAcc);
and replace it with

Code:
  if (Auth != 0)
                        {
                            if (BannedIP.Contains(Ip))
                            {
                                Socket.Disconnect();
                            }
                            Console.ForegroundColor = ConsoleColor.Blue;
                            General.WriteLine("Successful login for account " + ThisAcc + " IP: " + Ip);
                            Console.ResetColor();
                            Console.ForegroundColor = ConsoleColor.White;
Now go in your debug folder and create a TEXT document ( notepad file )

called IPBanList

Now when someone logins to your server you will see their account name and also their IP so just put the ip in the text document

ONE IP PER LINE!!!

and save it and restart server and that person will not be able to login

if this doesnt work please tell me and i will see why

even though this is Ultimatums press thanks if this helped and if he posts here then press thanks to him instead of me!
PeTe Ninja is offline  
Thanks
12 Users
Old 05/15/2009, 21:52   #2
 
elite*gold: 0
Join Date: Dec 2006
Posts: 133
Received Thanks: 16
The first thanks =], and i hope you will add the command soon.
martoon is offline  
Old 05/15/2009, 21:53   #3
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by martoon View Post
The first thanks =], and i hope you will add the command soon.
working on it ...i dont remember how to read ini from client.cs so im trying to remember
PeTe Ninja is offline  
Thanks
1 User
Old 05/15/2009, 21:53   #4
 
elite*gold: 0
Join Date: Dec 2006
Posts: 133
Received Thanks: 16
I will be waiting =D
martoon is offline  
Old 05/15/2009, 21:58   #5
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
It looks better than mine ..
danielachraf is offline  
Thanks
1 User
Old 05/15/2009, 22:14   #6
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
emme is making the command i think...i hope he is atleast i asked him for help on msn so if he makes it ill post here
PeTe Ninja is offline  
Thanks
1 User
Old 05/15/2009, 23:35   #7
 
ih8you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 146
Received Thanks: 38
nice pete +k =]
ih8you is offline  
Old 05/16/2009, 02:24   #8
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
Thank you..

Hope your still not mad at me
Vortex. is offline  
Old 05/16/2009, 03:53   #9
 
AndreaCo's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
pete if emme doesent code in command i will do it.. its easy... just pm me on msn and il do it
AndreaCo is offline  
Old 05/16/2009, 04:32   #10
 
superplox's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 275
Received Thanks: 23
i swear this has been released before...
superplox is offline  
Old 05/16/2009, 04:36   #11
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
Wow this is old and it still got thanks LOL

Quote:
Originally Posted by superplox View Post
i swear this has been released before...
It as, read the post...
Ultimatum is offline  
Old 05/16/2009, 05:53   #12
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by AndreaCo View Post
pete if emme doesent code in command i will do it.. its easy... just pm me on msn and il do it
make for me...emme coudnt figure it out i dont thikn he had enough time
PeTe Ninja is offline  
Old 05/16/2009, 07:21   #13
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Code:
  if (Auth != 0)
                        {
                            if (BannedIP.Contains(Ip))
                            {
                                Socket.Disconnect();
                               [B] return;[/B]
                            }
                            Console.ForegroundColor = ConsoleColor.Blue;
                            General.WriteLine("Successful login for account " + ThisAcc + " IP: " + Ip);
                            Console.ResetColor();
                            Console.ForegroundColor = ConsoleColor.White;
alexbigfoot is offline  
Old 05/16/2009, 09:10   #14
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by alexbigfoot View Post
Code:
  if (Auth != 0)
                        {
                            if (BannedIP.Contains(Ip))
                            {
                                Socket.Disconnect();
                               [B] return;[/B]
                            }
                            Console.ForegroundColor = ConsoleColor.Blue;
                            General.WriteLine("Successful login for account " + ThisAcc + " IP: " + Ip);
                            Console.ResetColor();
                            Console.ForegroundColor = ConsoleColor.White;
can you tell me why it needs return? im not argueing i just want to know what it does
PeTe Ninja is offline  
Old 05/16/2009, 11:45   #15
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
It was around 2 AM haha, and it was ages ago I touched LOTF.
Anyhow, go ahead and make a command (speaking to anyone), because I wont, developing my own game from scratch =P

Regards,
Emme
_Emme_ is offline  
Reply


Similar Threads Similar Threads
[Release]GuildWar LOTF
07/13/2010 - CO2 PServer Guides & Releases - 7 Replies
I will give you the release of a fixed GW (Some how) for LOTF 5017. First open World.cs then search for: public static Hashtable GWScores = new Hashtable(); under that paste: public static bool GW = false;
[Release]Second Rebirth For Lotf
03/20/2010 - CO2 PServer Guides & Releases - 10 Replies
Well i been noticed that no one has released second rebirth for lotf witch is kinda werid but im guessing they just wanted people to learn how to code it. Well here is my second rebirth code hope you like it even though people don't use lotf anymore. Add this in client.cs public string RBGem2 = ""; Add this in character.cs public byte SecondJob = 0; Add this under public void ReBorn(byte ToJob) in character.cs
[Release]XP Shield(LOTF)
07/31/2009 - CO2 PServer Guides & Releases - 16 Replies
I haven't released anything in awhile, and I removed all my other releases so... I'll throw a random lotf release since a bunch of people are using lotf lately for practise. This is handy, and can be used as a reference when making skills of similar style. First, add in database.cs SkillAttributes = new ushort; SkillAttributes = new ushort { 7, 0, 0, 0, 0, 0 }; SkillsDone.Add(1020, 0); Now the rest goes into character.cs, just search the lines I...
Release[SUPEREME Lotf]
05/19/2009 - CO2 PServer Guides & Releases - 22 Replies
This Is JezebelCos MY Old servers source Contains Cp bags night/day 1st reborn guard exp pot 2nd reborn Luckytime
[Release] Those still using LOTF
04/17/2009 - CO2 PServer Guides & Releases - 23 Replies
Help yourself be a better coder and listen to what the community is trying to say. One day you will understand why some are trying to encourage people still using LOTF to move to a more stable source and only use LOFT as a basis of learning and how you can improve (A LOT) on the LOTF coding. There's a lot of GREAT coding examples in InfamousNoone's source which you can actually learn from and gain a greater understanding of how a PROPER server operates. After all why do you think...



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


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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