|
| |||||||
| Prosedürler & Kodlar Yardım Prosedürler & Kodlarla ilgili sorunlarınızı sorabileceğiniz bölüm |
| |
| DUYURULAR |
Register Now for FREE! |
![]() |
| | LinkBack | Seçenekler | Stil |
| | #1 (permalink) | |||||||||||
| Yeni Üye ![]()
Üyelik tarihi: Oct 2008 Yaş: 23
Mesajlar: 12
Konu Dışı Postlar: 0 Rep Puanı: 2375 Rep Derecesi: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Rep Gücü: 26 | --Hazırlayan Trayhoper CREATE PROCEDURE ACCOUNT_LOGIN @AccountID varchar(21), @Password varchar(13), @nRet smallint OUTPUT AS DECLARE @OtoUyelik int,@ServerLimit int,@AccountBan int,@IPBan int,@OtoMaster int,@Bakim int SET @AccountBan = 0 SET @IPBan = 0 SET @ServerLimit = 800 SET @OtoUyelik = 0 SET @OtoMaster = 0 SET @Bakim = 0 -- Oto Uyelik IF @OtoUyelik = 1 BEGIN SELECT @nRet = count(strAccountID) from TB_USER WHERE strAccountID = @AccountID IF NOT exists(SELECT strAccountID FROM TB_USER WHERE strAccountID = @AccountID) insert into TB_USER (strAccountID, strPassWd, strSocNo, idays) values (@AccountID, @password, 1, '6') END -- Oto Uyelik -- Server Limit DECLARE @Oyuncu int,@pwd varchar(13) SET @pwd = null IF NOT @ServerLimit = 0 BEGIN SELECT @Oyuncu = Count(*) From CURRENTUSER IF @Oyuncu <= @ServerLimit BEGIN SELECT @pwd = strPassWd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID END ELSE IF @Oyuncu > @ServerLimit BEGIN SELECT @pwd = strPassWd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and Premiumdays > 0 END END -- Server Limit -- Account Ban IF @AccountBan = 1 BEGIN IF exists(SELECT strAccountID FROM BLOCK_ACCOUNT WHERE strAccountID = @AccountID) SET @nRet = 4 RETURN END -- Accont Ban -- IP Ban DECLARE @CharIP varchar(50) SELECT @CharIP = IP FROM TB_USER WHERE strAccountID = @AccountID IF @IPBan = 1 BEGIN IF exists(SELECT Numara FROM BLOCK_IP WHERE Numara = @CharIP) SET @nRet = 4 END -- IP Ban -- Oto Master DECLARE @CharID1 varchar(21),@CharID2 nvarchar(21),@CharID3 nvarchar(21) SELECT @CharID1 = strCharID1,@CharID2 = strCharID3,@CharID3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID IF @OtoMaster = 1 BEGIN UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID1 UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID2 UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID3 END -- Oto Master -- Bakım Modu DECLARE @CharID1Au int,@CharID2Au int,@CharID3Au int SELECT @CharID1Au = Authority FROM USERDATA WHERE strUserID = @CharID1 SELECT @CharID2Au = Authority FROM USERDATA WHERE strUserID = @CharID2 SELECT @CharID3Au = Authority FROM USERDATA WHERE strUserID = @CharID3 IF @Bakim = 1 IF NOT @CharID1Au = 0 OR NOT @CharID2Au = 0 OR NOT @CharID3Au = 0 BEGIN SET @nRet = 4 RETURN END -- Bakım Modu DECLARE @Nation tinyint, @CharNum smallint,@Game int,@Limit int SET @Nation = 0 SET @CharNum = 0 -- Şifre Bölümü Boşsa IF @pwd IS null BEGIN SET @nRet = 3 RETURN END -- Şifre Yanlışsa ELSE IF @pwd <> @Password BEGIN SET @nRet = 3 RETURN END -- Hesap Kullanımdaysa ELSE IF exists(SELECT strAccountID FROM CURRENTUSER WHERE strAccountID = @AccountID) BEGIN SET @nRet = 5 RETURN END -- Hesap Yoksa ELSE IF NOT exists(SELECT strAccountID FROM TB_USER WHERE strAccountID = @AccountID) BEGIN SET @nRet = 2 RETURN END SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID IF @@ROWCOUNT = 0 BEGIN SET @nRet = 1 RETURN END IF @CharNum = 0 BEGIN SET @nRet = 1 RETURN END ELSE BEGIN SET @nRet = @Nation + 1 RETURN END GO Bu Prosedürü kuLLanıyorum. bi arkadaşın werdiği Loginserver'ı kullanıyorum fakat GM charlada blocked diyo user charLa'da fiLesLarın hepsini açıyorum acil yardım lütfen. :S Ne yapmam gerekiyor neyi denemem gerekiyor bakarmısınız lütfen. Konu Another tarafından (21-11-2008 Saat 17:42 ) değiştirilmiştir.. Sebep: Duplicated post... | |||||||||||
| | |
| | #2 (permalink) | ||||||||||||
| Ko-CuCe CüCeLoPeR..! ![]()
Üyelik tarihi: Jul 2008 Şubesi: Nereye Beah
Mesajlar: 1.590
Konu Dışı Postlar: 0 Rep Puanı: 103913 Rep Derecesi: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Rep Gücü: 1047
Ruh Hali: | Kod: TB_USER tablosunda IP sekmesi bulunmalıdır.Çoğu db de vardır ama olmayanlarda TB_USER'a sağ tıklayıp design table a basarak IP sekmesini nvarchar(16) şeklinde ekleyebilirler .. Altını çizmek istiyorum vista kullandığım için prosedürü deneyemedim.Yanlış şifre girildiğinde yanlış şifre uyarısı , hesap bulunamadığında hesap yok hatası vb. bütün hatalar ayarlıdır. Local serverlarınızda deneyip sonuçları buraya yazarsanız sevinirim .. Daha önceki IP Ban Sistemi konumdakileri uygulayan arkadaşların yeni tablo eklemesine gerek yok fakat prosedürü üzerine tekrar kopyalamaları gerekiyor !
__________________ Alıntı:
| ||||||||||||
| | |
