搜索
 找回密码
 加入

一个功能很全的log存储

28085279 2009-7-28 13:39:18 1423
- Ayarlamalı Oto Master
- Ayarlamalı Oto Uyelik
- Ayarlamalı IP Ban
- Ayarlamalı Server Limit
- Ayarlamalı Account Ban
- Ayarlamalı Bakım Modu
- Detaylı Bilgilendirme
- Problemsiz


Öncelikle şunu söyeyim prosedürde ayarlayabileceğiniz özellikler en yukarıda belirtilmiştir :

SET @OtoMaster = 0 ( Oto masterı kapatır ) , 1 ( Oto masterı açar )
SET @OtoUyelik = 0 ( Oto uyeliği kapatır ) , 1 ( oto üyeliği açar )
SET @AccountBan = 0 ( Account Ban özelliğini kapar ) , 1 ( Account ban özelliğini açar )
SET @IPBan = 0 ( IP Ban sistemini kapar ) , 1 ( IP Ban sistemini açar )
SET @ServerLimit = 0 ( Servera Herkes Girebilir ) , 0 Harici bir değer ( Server Giriş Limiti girdğiniz sayı olur )
SET @Bakim = 0 ( Servera herkes giriş yapabilir ) , 1 ( Servera sadece gm karakteri olanlar giriş yapabilir )

Kısacası 1 aktifleştirir , 0 pasifleştirir ..

Tablolarımız :

BLOCK_IP = Numara (nvarchar 21)
BLOCK_ACCOUNT = strAccountID = (nvarchar 21)

Yukarıdaki 2 tabloyu oluşturduktan sonra prosedürleri aşağıdaki gibi değiştiriyoruz :

PROC_INSERT_CURRENTUSER
  1. CREATE PROCEDURE PROC_INSERT_CURRENTUSER
  2. @AccountID     varchar(50),
  3. @CharID         varchar(50),
  4. @ServerNo     int,  
  5. @ServerIP       varchar(50),
  6. @ClientIP       varchar(50),
  7. @nret smallint output  
  8. AS
  9. -- Ip Ban System by Trayhoper

  10. DECLARE @Sayi int
  11. SELECT @Sayi = count(Numara) FROM BLOCK_IP WHERE Numara = @ClientIP
  12. IF @Sayi > 0  
  13.     BEGIN
  14.         SET @nRet = 0
  15.     RETURN
  16. END

  17. ELSE IF @Sayi = 0
  18.     BEGIN
  19.            INSERT INTO CURRENTUSER (nServerNo, strServerIP,  strAccountID, strCharID, strClientIP )  Values  (@ServerNo, @ServerIP, @AccountID, @CharID, @ClientIP )
  20.     UPDATE TB_USER Set IP = @ClientIP WHERE strAccountID = @AccountID
  21.         SET @nRet = 1
  22.     RETURN
  23. END
  24. GO
复制代码
ACCOUNT_LOGIN
  1. --Hazırlayan Trayhoper
  2. CREATE PROCEDURE ACCOUNT_LOGIN
  3. @AccountID    varchar(21),
  4. @Password    varchar(13),
  5. @nRet        smallint    OUTPUT

  6. AS
  7. DECLARE @OtoUyelik int,@ServerLimit int,@AccountBan int,@IPBan int,@OtoMaster int,@Bakim int
  8. SET @AccountBan = 0
  9. SET @IPBan = 0
  10. SET @ServerLimit = 800
  11. SET @OtoUyelik = 0
  12. SET @OtoMaster = 0
  13. SET @Bakim = 0
  14. -- Oto Uyelik
  15. IF @OtoUyelik = 1
  16.     BEGIN
  17.         SELECT @nRet = count(strAccountID) from TB_USER WHERE strAccountID = @AccountID
  18.             IF NOT exists(SELECT strAccountID FROM TB_USER WHERE strAccountID = @AccountID)
  19.                     insert into TB_USER (strAccountID, strPassWd, strSocNo, idays) values (@AccountID, @password, 1, '6')
  20. END     
  21. -- Oto Uyelik
  22. -- Server Limit
  23. DECLARE @Oyuncu int,@pwd varchar(13)
  24. SET @pwd = null
  25. IF NOT @ServerLimit = 0
  26.     BEGIN
  27.         SELECT @Oyuncu = Count(*) From CURRENTUSER
  28.         IF @Oyuncu <= @ServerLimit
  29.             BEGIN
  30.                 SELECT @pwd = strPassWd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID
  31.         END
  32.     ELSE IF @Oyuncu > @ServerLimit
  33.         BEGIN
  34.                 SELECT @pwd = strPassWd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and Premium > 0
  35.     END
  36. END
  37. -- Server Limit
  38. -- Account Ban
  39. IF @AccountBan = 1
  40.     BEGIN
  41.         IF exists(SELECT strAccountID FROM BLOCK_ACCOUNT WHERE strAccountID = @AccountID)
  42.             SET @nRet = 4
  43.     RETURN
  44. END
  45. -- Accont Ban
  46. -- IP Ban  
  47. DECLARE @CharIP varchar(50)
  48. SELECT @CharIP = IP FROM TB_USER WHERE strAccountID = @AccountID
  49. IF @IPBan = 1
  50.     BEGIN
  51.         IF exists(SELECT Numara FROM BLOCK_IP WHERE Numara = @CharIP)
  52.             SET @nRet = 4
  53. END     
  54. -- IP Ban
  55. -- Oto Master
  56. DECLARE @CharID1 varchar(21),@CharID2 nvarchar(21),@CharID3 nvarchar(21)
  57. SELECT @CharID1 = strCharID1,@CharID2 = strCharID3,@CharID3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
  58. IF @OtoMaster = 1
  59.     BEGIN
  60.          
  61.             UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID1
  62.             UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID2
  63.             UPDATE USERDATA SET class = class + 1 where class % 2 != 0 and level > 59 and strUserID = @CharID3
  64. END
  65. -- Oto Master
  66. -- Bak&#305;m Modu
  67. DECLARE @CharID1Au int,@CharID2Au int,@CharID3Au int
  68. SELECT @CharID1Au = Authority FROM USERDATA WHERE strUserID = @CharID1
  69. SELECT @CharID2Au = Authority FROM USERDATA WHERE strUserID = @CharID2
  70. SELECT @CharID3Au = Authority FROM USERDATA WHERE strUserID = @CharID3
  71. IF @Bakim = 1
  72.     IF NOT @CharID1Au = 0 OR NOT @CharID2Au = 0 OR NOT @CharID3Au = 0
  73.         BEGIN
  74.             SET @nRet = 4
  75.         RETURN
  76. END

  77. -- Bak&#305;m Modu
  78. DECLARE @Nation tinyint, @CharNum smallint,@Game int,@Limit int
  79. SET @Nation = 0
  80. SET @CharNum = 0

  81. -- &#350;ifre B&ouml;lümü Bo&#351;sa
  82. IF @pwd IS null
  83.     BEGIN
  84.         SET @nRet = 3
  85.     RETURN
  86. END
  87. -- &#350;ifre Yanl&#305;&#351;sa
  88.     ELSE IF @pwd <> @Password
  89.         BEGIN
  90.             SET @nRet = 3
  91.         RETURN
  92. END
  93. -- Hesap Kullan&#305;mdaysa
  94.     ELSE IF exists(SELECT strAccountID FROM CURRENTUSER WHERE strAccountID = @AccountID)
  95.         BEGIN
  96.             SET @nRet = 5
  97.     RETURN
  98. END
  99. -- Hesap Yoksa
  100.     ELSE IF NOT exists(SELECT strAccountID FROM TB_USER WHERE strAccountID = @AccountID)
  101.         BEGIN
  102.             SET @nRet = 2
  103.     RETURN
  104. END

  105. SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
  106. IF @@ROWCOUNT = 0
  107.     BEGIN
  108.         SET @nRet = 1
  109.     RETURN
  110. END
  111. IF @CharNum = 0
  112.     BEGIN
  113.         SET @nRet = 1
  114.     RETURN
  115. END
  116. ELSE
  117.     BEGIN
  118.         SET @nRet = @Nation + 1
  119.     RETURN
  120. END
  121. GO
复制代码

8 回复

28085279
2009-1-30 01:02:56
楼主
点击查看详情
- Ayarlamal&#305; Oto Master
- Ayarlamal&#305; Oto Uyelik
- Ayarlamal&#305; IP Ban
- Ayarlamal&#305; Server Limit
- Ayarlamal&#305; Account Ban
- Ayarlamal&#305; Bak&#305;m Modu
- Detayl&#305; Bilgilendirme
- Problemsiz
pprong
2009-1-30 02:55:11
原文是土耳其语的,看不懂 哈哈 希望有人可以翻译一下
hackerneo
2009-1-30 20:25:00
提示: 作者被禁止或删除 内容自动屏蔽
28085279
2009-1-31 09:40:55
楼主
自动注册,自动封号
lz2006
2009-2-1 06:32:12
自动封号何解?
6156210
2009-2-1 12:09:40
注册完 就封号 哈哈哈
ft222
2009-2-1 12:17:21
fyf3411900
2009-7-28 13:39:18
看不懂!
高级模式
游客