Junior Spellweaver
- Joined
- Sep 14, 2011
- Messages
- 196
- Reaction score
- 64
Hello Ragezoners,
I have today a method to limit client connection via IP with table SK_gamebang_ip.
//Re-Create table SK_gamebang_ip
First, you should Re-create SK_gamebang_ip table ...
-=-=--=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Create Procedure dbo.Adding_SK_gamebang_ip
Second, Lets create "Adding_SK_gamebang_ip" Procedure ...
Now lets run the Procedure:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
After Adding, you have to refresh BangIP via SMC by going to ServerControl Tab and Right click on Gateway Server, and select "Refresh Franchise IP Data (PC bang)".
And you are finished ^^
if you see it nice topic, Don't forget !!
Rep + Like
I have today a method to limit client connection via IP with table SK_gamebang_ip.
//Re-Create table SK_gamebang_ip
First, you should Re-create SK_gamebang_ip table ...
PHP:
USE [SRO_VT_SHARD]
GO
/****** Object: Table [dbo].[SK_gamebang_ip] Script Date: 04/03/2012 14:30:58 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SK_gamebang_ip]') AND type in (N'U'))
DROP TABLE [dbo].[SK_gamebang_ip]
GO
USE [SRO_VT_SHARD]
GO
/****** Object: Table [dbo].[SK_gamebang_ip] Script Date: 04/03/2012 14:30:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SK_gamebang_ip](
[nID] [smallint] IDENTITY (1,1) NOT NULL,
[ip] [int] NOT NULL,
[capacity] [smallint] NOT NULL
) ON [PRIMARY]
-=-=--=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Create Procedure dbo.Adding_SK_gamebang_ip
Second, Lets create "Adding_SK_gamebang_ip" Procedure ...
PHP:
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[Adding_SK_gamebang_ip] Script Date: 04/03/2012 14:52:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Megaman963
-- Create date: 04/03/2012
-- Description: Adding Limited Client Access to server via IP
-- =============================================
CREATE PROCEDURE [dbo].[Adding_SK_gamebang_ip]
-- Add the parameters for the stored procedure here
@IP1 int, @IP2 int, @IP3 int, @IP4 int, @Capacity smallint
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
declare @IP int
declare @nip1 int
declare @nip2 int
declare @nip3 int
declare @nip4 int
set @nip1 = @IP1
set @nip2 = @IP2 * 256
set @nip3 = @IP3 * 256 * 256
set @nip4 = @IP4 * 256 * 256 * 256
set @IP = @nip1 + @nip2 + @nip3 + @nip4
INSERT INTO [Vengard_ACCOUNT].[dbo].[SK_gamebang_ip]
([ip],[capacity]) VALUES (@IP,@Capacity)
END
GO
Now lets run the Procedure:
PHP:
exec Adding_SK_gamebang_ip <IP1>, <IP2>, <IP3>, <IP4>, <Numberofconnection>
-- You have to replace <IP1> with first part of your ip, and so on. and <Numberofconnection> replace it with Number of client which connect per IP.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
After Adding, you have to refresh BangIP via SMC by going to ServerControl Tab and Right click on Gateway Server, and select "Refresh Franchise IP Data (PC bang)".
And you are finished ^^
if you see it nice topic, Don't forget !!
Rep + Like
Last edited: