DeathKO | v.24xx Light Farm | PHOENIX | 26 Nisan Cuma 22:00'da Açılıyor!
Cuceko
Cuceko

Oto Registiration "MAIN_LOGIN"

  •         

            

            

            

            

  • HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding
E Çevrimdışı
11 Ocak 2012
12,856
104
63
İçerik Açılmıştır Teşekkürler :)
Kod:
IF EXISTS(SELECT * FROM sys.objects WHERE type = 'P' AND name = 'MAIN_LOGIN')

DROP PROCEDURE MAIN_LOGIN

GO



CREATE PROCEDURE [dbo].[MAIN_LOGIN]

@AccountID	char(21),

@Password	char(21),

@nRet		smallint	OUTPUT

AS

/*

Author : AKUMA

Update : 30.03.2009 - 11:22

*/



-- # Login Disabled  for Banned Accounts Start # --

DECLARE @Banned1 int,@Banned2 int,@Banned3 int

SELECT @Banned1 = Authority FROM USERDATA WHERE strUserId = (SELECT strCharID1 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID1 is not null)

SELECT @Banned2 = Authority FROM USERDATA WHERE strUserId = (SELECT strCharID2 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID2 is not null)

SELECT @Banned3 = Authority FROM USERDATA WHERE strUserId = (SELECT strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID AND strCharID3 is not null)



IF @Banned1 = 255 OR @Banned2 = 255 OR @Banned3 = 255

BEGIN

	-- Blocked Account

	SET @nRet = 4

	RETURN

END

-- # Login Disabled  for Banned Accounts End # --



-- # Auto Account Start #

SELECT @nRet = Count(strAccountID) FROM TB_USER WHERE strAccountID = @AccountID

IF @nRet = 0

BEGIN

	INSERT INTO TB_USER (strAccountID,strPasswd,strSocNo,idays) VALUES (@AccountID,@Password,1,6)

END

-- # Auto Account Start #



DECLARE @pwd varchar(21)



SET @pwd = null



SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID

IF @pwd IS null

BEGIN

	-- Invalid Password

	SET @nRet = 3

	RETURN

END

ELSE IF @pwd <> @Password

BEGIN

	-- Invalid Password

	SET @nRet = 3

	RETURN

END

ELSE IF @pwd = @Password

BEGIN



	-- # Check Current User Start #

	SELECT @nRet = Count(strAccountId) FROM CURRENTUSER WHERE strAccountId = @AccountID

	IF @nRet <> 0

	BEGIN

		DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID

	END

	-- # Check Current User End #

		

	-- Login Sucessfull

	SET @nRet = 1

	RETURN

END
 
1 Çevrimdışı

111Mutay

Guest
MAIN_LOGIN... Hmm, eskiden kullanırdık :) Kullanacak arkadaşlar, server dosyalarında uygun düzenlemeyi yapmayı unutmasınlar.