Updated Ban Procedure

Results 1 to 15 of 15
  1. #1
    Cyclops-Network Owner Alexsh is offline
    MemberRank
    Sep 2009 Join Date
    New YorkLocation
    306Posts

    Updated Ban Procedure

    I've decided to update the current ban procedure in the account_dbf, i've updated it so you can set an unban time or "length" on it. By entering a certain date for length such as 20100218 this means that February 18th would be the last ban day, the account would then be able to login the next day, being February 19th.

    So anyway, here it is. Thank me if you use it.

    Code:
    USE [ACCOUNT_DBF]
    GO
    /****** Object:  StoredProcedure [dbo].[usp_BAN_UNBAN]    Script Date: 02/19/2010 10:20:28 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[usp_BAN_UNBAN]
    @section int,	-- 1 : BAN, 2 : UNBAN
    @account varchar(32),
    @gPotatoID int,	-- Not Used
    @reason varchar(500),
    @length char(8)
    as
    /*
    	Created By soondai@aeonsoft.co.kr
    	Create Date : 2008-01-24
    
    	@section   =>   1 : BAN,  2 : UNBAN
    	@gPotatoID   =>   Not Used Parameter for Flyff
    	@length   =>   length of ban
    */
    set nocount on
    set xact_abort on
    
    -- Check Account
    if not exists (select * from ACCOUNT_TBL where account = @account)
    begin
    	select -1	-- The account does not exist
    end
    else
    begin
    /*****************************************************
    			BAN
    *****************************************************/
    	if (@section = 1)
    	begin
    		update ACCOUNT_TBL_DETAIL
    		set BlockTime = @length, WebTime = '21000101'
    		where account = @account
    
    		--  LOGGING
    		insert into TBL_LOG_BLOCK_ACCOUNT
    			(account, code1, code2, code3, old_block_day, old_web_day, block_day, web_day, input_id, input_day, reason)
    		values (@account, 0, 0, 3, '', '', @length, @length, 'Ban', getdate(), @reason)
    
    		--   return results
    		if @@error <> 0
    		begin
    			select 'BAN Error : ' + @@error	-- Error
    		end
    		else
    		begin
    			select 1		-- Success
    		end
    	end
    /*****************************************************
    			UNBAN
    *****************************************************/
    	if (@section = 2)
    	begin
    		update ACCOUNT_TBL_DETAIL
    		set BlockTime = convert(char(8), dateadd(d, -1, getdate()), 112), WebTime = convert(char(8), dateadd(d, -1, getdate()), 112)
    		where account = @account
    
    		--   LOGGING
    		update TBL_LOG_BLOCK_ACCOUNT
    		set old_block_day = block_day, old_web_day = web_day
    			, r_web_day = convert(char(8), dateadd(d, -1, getdate()), 112), r_block_day = convert(char(8), dateadd(d, -1, getdate()), 112)
    			, r_input_day = getdate(), r_reason = @reason, r_input_id = '1'
    		where account = @account
    			and num = (select max(num) from TBL_LOG_BLOCK_ACCOUNT where account = @account)
    
    		--   return results
    		if @@error <> 0
    		begin
    			select 'UNBAN Error : ' + @@error	-- Error
    		end
    		else
    		begin
    			select 1		-- Success
    		end
    	end
    end
    Last edited by Alexsh; 19-02-10 at 04:24 PM.


  2. #2
    Valued Member PascoalBR is offline
    MemberRank
    Sep 2008 Join Date
    135Posts

    Re: Updated Ban Procedure

    Nice release!
    thx! :D

  3. #3
    Valued Member shappy23 is offline
    MemberRank
    Dec 2008 Join Date
    PhilippinesLocation
    113Posts

    Re: Updated Ban Procedure

    how to use lol haha

  4. #4
    Proficient Member ancelmylove is offline
    MemberRank
    Aug 2008 Join Date
    C:\WindowsLocation
    182Posts

    Re: Updated Ban Procedure

    yeahh how to used this ingame?

  5. #5
    Account Upgraded | Title Enabled! ecKo9321 is offline
    MemberRank
    Nov 2009 Join Date
    forum.ragezoneLocation
    491Posts

    Re: Updated Ban Procedure

    you cant use this in game

    this is a stored procedure, wich you can ban players in SQL SERVER MANAGEMENT STUDIO :3

  6. #6
    [R8]ℓσℓ32 caja is offline
    MemberRank
    Oct 2008 Join Date
    Here!Location
    1,502Posts

    Re: Updated Ban Procedure

    You have to run on database, not in game xD

  7. #7
    Account Upgraded | Title Enabled! ecKo9321 is offline
    MemberRank
    Nov 2009 Join Date
    forum.ragezoneLocation
    491Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by caja View Post
    You have to run on database, not in game xD
    hah I was 1st :O

    1 second faster xD

  8. #8
    Proficient Member ancelmylove is offline
    MemberRank
    Aug 2008 Join Date
    C:\WindowsLocation
    182Posts

    Re: Updated Ban Procedure

    so how can i used that in my database?

  9. #9
    Cyclops-Network Owner Alexsh is offline
    MemberRank
    Sep 2009 Join Date
    New YorkLocation
    306Posts

    Re: Updated Ban Procedure

    I'm currently working on a php script for it.

  10. #10
    Apprentice TheGrea is offline
    MemberRank
    Feb 2010 Join Date
    15Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by Alexsh View Post
    I'm currently working on a php script for it.
    thanks waiting for it to realease

  11. #11
    Account Upgraded | Title Enabled! ecKo9321 is offline
    MemberRank
    Nov 2009 Join Date
    forum.ragezoneLocation
    491Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by TheGrea View Post
    thanks waiting for it to realease
    leacher

  12. #12
    Cyclops-Network Owner Alexsh is offline
    MemberRank
    Sep 2009 Join Date
    New YorkLocation
    306Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by TheGrea View Post
    thanks waiting for it to realease
    Who said I was going to release it? Lol.

  13. #13
    Now you can tag me! Detox is offline
    MemberRank
    May 2009 Join Date
    NorwayLocation
    1,821Posts

    Re: Updated Ban Procedure

    Nice Alex. ;)

  14. #14
    Apprentice TheGrea is offline
    MemberRank
    Feb 2010 Join Date
    15Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by Alexsh View Post
    Who said I was going to release it? Lol.
    OMG... huhuhuhu ok fine if you dont want to release it huhuhu

  15. #15
    Account Upgraded | Title Enabled! ecKo9321 is offline
    MemberRank
    Nov 2009 Join Date
    forum.ragezoneLocation
    491Posts

    Re: Updated Ban Procedure

    Quote Originally Posted by TheGrea View Post
    OMG... huhuhuhu ok fine if you dont want to release it huhuhu
    I lol`d



Advertisement