Register for your free account! | Forgot your password?

You last visited: Today at 07:09

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

Advertisement



IP BAN Problem

Discussion on IP BAN Problem within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2012
Posts: 52
Received Thanks: 13
IP BAN Problem

Hello,

I am using xxdashxx's ban script. Everything works well but when an ip got banned that user can ban anybody who he/she knows the ID of the user. Because the procedure is not checking if the password is correct or not ,it is just checking IP and ID if one of them matches it is banning the account.

procedure is :
Code:
--Check for IP ban, if so set the status of the user to banned.
IF(SELECT COUNT(*) FROM [GM_Stuff].[dbo].[BannedIP] where [IP1] = @UserIP) > 0
BEGIN
SET @Status = -2
UPDATE PS_UserData.dbo.Users_Master SET [Status] = @Status WHERE UserID = @UserID
END
IF(SELECT COUNT(*) FROM PS_UserData.dbo.Users_Master where [UserIp] = @UserIP and [Status] = '-2') > 0
BEGIN
-- if previous section returns results witch means the ip is attatched to an account previously ip banned
IF(SELECT COUNT(*) FROM [GM_Stuff].[dbo].[BannedIP] where [UserID] = @UserID) > 0
UPDATE [GM_Stuff].[dbo].[BannedIP] SET [LogAtempt] = 'TRUE' WHERE UserID = @UserID
Else INSERT INTO [GM_Stuff].[dbo].[BannedIP] (UserID,BanDate,IP1,StaffID,StaffIP,[LogAtempt])
Values (@UserID,GETDATE(),@UserIP,'Log','127.0.0.1','TRUE')
END

Could anybody fix that procedure to check Passwords as well besides IP and ID it should not ban if the pasword is incorrect.

Thanks
.Curious. is offline  
Old 05/27/2013, 19:00   #2

 
{Skrillex}'s Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 849
Received Thanks: 407
Use Windows Firewallas an Ip Ban.
{Skrillex} is offline  
Thanks
1 User
Old 05/27/2013, 19:29   #3
 
elite*gold: 0
Join Date: Apr 2012
Posts: 52
Received Thanks: 13
Quote:
Originally Posted by ϟƘƦƖןןΣ✘ View Post
Use Windows Firewallas an Ip Ban.
Thanks for your reply but I wanna use that one.
.Curious. is offline  
Old 05/28/2013, 17:24   #4

 
{Skrillex}'s Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 849
Received Thanks: 407
Today I´m Santa Clouse and make wishes true!

Excute this Query:
Quote:
USE [PS_UserData]
GO
/****** Object: Table [dbo].[BannedIPs] Script Date: 07/30/2010 10:23:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BannedIPs](
[Row] [int] IDENTITY(1,1) NOT NULL,
[banIP] [varchar](15) NOT NULL,
[Reason] [varchar](18) NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
If u want to Ban an Ip Use This Query:
Quote:
INSERT INTO [PS_UserData].[dbo].[BannedIPs] (Banip,Reason)
Values ('Put Ip here','Put Reason here')
{Skrillex} is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Problem]Habe ein Problem und zwar spinnt mein VPC etwas(ohne Grund)?!
07/28/2011 - Metin2 Private Server - 10 Replies
Also wie schon gesagt meins Server spinnt wodurch kiks usw. kommen :( ich lade euch die Screens in den Anhang, mit der Hoffnung, dass ihr mir helfen könnt :) wäre echt sehr nice :)



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


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.