2003.02.07 (金) 00:06:10 <u*j*2*6*> 大量交換のサポートは24120で対応する予定
shuusei24119:投網・連キュー対策(DL要求・//WantQueueの連続送信をブロック/Leech化/Ban)(idea by 2ndreal,antiDOM)

diff --dos -wurN 24118/handler.pas 24119/handler.pas
--- 24118/handler.pas	Wed Feb 05 16:53:30 2003
+++ 24119/handler.pas	Thu Feb 06 23:10:26 2003
@@ -1939,8 +1939,69 @@
  tmp_pos:=272;
  msg:=Copy(NextParamEx(gcmd.cmd),1,max_privmsg_len);
  if trim(msg)='' then exit;
- if (msg='//WantQueue') and (local<>nil) then
+ if (msg='//WantQueue') then
+ begin
+   tmp_pos:=122621;
+   if user^.level=napUserLeech then
+   begin
+     Exec(user,MSG_SERVER_UPLOAD_FAILED,gcmd.cmd);
+     Exec(user,MSG_SERVER_NOSUCH,'あなたは'+levels[0]+'です。'
+       +'このサーバーでは、'+levels[0]+'はキュー入れできません');
+     exit;
+   end;
+   tmp_pos:=122622;
+   if (local<>nil) then
+   begin
   if not CheckWinMX(local) then exit;
+     //-----------------------------------wantqueueカウント.mods+,friendもやる
+     tmp_pos:=122623;
+     user2:=db_online.FindUser(str);
+     tmp_pos:=122624;
+     if user2=nil then
+     begin
+       UserIsOffline(str,true);
+       exit;
+     end;
+     tmp_pos:=122625;
+     if user2^.server=nil then
+       l2:=FindLocalUser(user2^.username)
+     else
+       l2:=nil;
+     tmp_pos:=122626;
+     inc(local.wantqueuep3m);//WQ元がローカルならとりあえずカウント
+     tmp_pos:=122627;
+     if (l2<>nil) and StrHash_FindString(l2.hotlist,AnsiLowerCase(local.nick),true) then
+       dec(local.wantqueuep3m);//WQ元とWQ先がともにローカルでホットリストにWQ元がいるときは戻す
+     //-----------------------------------連キューブロック
+     tmp_pos:=122628;
+     if local.level<napUserModerator then
+     if not StrHash_FindString(db_friends,local.nick,true) then
+     if (wqfloodblock_count<>0) and (local.wantqueuep3m>wqfloodblock_count) then
+     begin
+       local.Exec(MSG_SERVER_NOSUCH,'一度に連キューしすぎです!');
+       case wqfloodblock_method of
+         block: local.Exec(MSG_SERVER_NOSUCH,'連キューをブロックしました:WantQueue/上限(3分間で)='
+                +IntToStr(local.wantqueuep3m)+'/'+IntToStr(wqfloodblock_count));
+         leech:
+         begin
+           local.Exec(MSG_SERVER_NOSUCH,'あなたのユーザーレベルを'+levels[0]+'にします。');
+           local.data^.level:=napUserLeech;
+           RegisterUser(user,servername_t);
+           Wallop(MSG_SERVER_NOSUCH,wallopLevel,GetLangT(LNG_LEVEL1,servername_t,
+             local.nick,Level2Str(napUserLeech),IntToStr(Ord(napUserLeech))),false);
+         end;
+         ban:
+         begin
+           BanUser(local.nick,servername_t,wqfloodblock_bantime,'連Q ID:'+local.nick,true);
+           AddReconnector(decode_ip(local.ip));
+           DisconnectUser(local,'',GetLangT(LNG_KILLED,local.nick,local.software,
+             'Server '+servername_t)+' - 連Q','Handler_PrivateMessage',false);
+         end;
+       end;
+       exit;
+     end;
+   end;
+ end;
  tmp_pos:=273;
  user2:=db_online.FindUser(str);
  if user2=nil then
@@ -3239,6 +3300,58 @@
    exit;
  end;
  tmp_pos:=122622;
+ if local<> nil then
+ begin
+   //-----------------------------------DLカウント.mods+,friendもやる
+   tmp_pos:=122623;
+   user2:=db_online.FindUser(hlist.Strings[0]);
+   tmp_pos:=122624;
+   if user2=nil then
+   begin
+     Exec(user,MSG_SERVER_UPLOAD_FAILED,gcmd.cmd);
+     UserIsOffline(hlist.Strings[0],true);
+     exit;
+   end;
+   tmp_pos:=122625;
+   if user2^.server=nil then
+     l2:=FindLocalUser(user2^.username)
+   else
+     l2:=nil;
+   tmp_pos:=122626;
+   inc(local.dlrequestsp3m);//DL元がローカルならとりあえずカウント
+   tmp_pos:=122627;
+   if (l2<>nil) and StrHash_FindString(l2.hotlist,AnsiLowerCase(local.nick),true) then
+     dec(local.dlrequestsp3m);//DL元とDL先がともにローカルでホットリストにDL元がいるときは戻す
+   //--------------------------------------------投網ブロック
+   tmp_pos:=122628;
+   if local.level<NapUserModerator then
+   if not StrHash_FindString(db_friends,local.nick,true) then
+   if (dlfloodblock_count<>0) and (local.dlrequestsp3m>dlfloodblock_count) then
+   begin
+     local.Exec(MSG_SERVER_NOSUCH,'一度にDL要求しすぎです!');
+     case dlfloodblock_method of
+       block: local.Exec(MSG_SERVER_NOSUCH,'DL要求をブロックしました:DL要求/上限(3分間で)='
+                +IntToStr(local.dlrequestsp3m)+'/'+IntToStr(dlfloodblock_count));
+       leech:
+       begin
+         local.Exec(MSG_SERVER_NOSUCH,'あなたのユーザーレベルを'+levels[0]+'にします。');
+         local.data^.level:=napUserLeech;
+         RegisterUser(user,servername_t);
+         Wallop(MSG_SERVER_NOSUCH,wallopLevel,GetLangT(LNG_LEVEL1,servername_t,
+           local.nick,Level2Str(napUserLeech),IntToStr(Ord(napUserLeech))),false);
+       end;
+       ban:
+       begin
+         BanUser(local.nick,servername_t,dlfloodblock_bantime,'投網 ID:'+local.nick,true);
+         AddReconnector(decode_ip(local.ip));
+         DisconnectUser(local,'',GetLangT(LNG_KILLED,local.nick,local.software,
+           'Server '+servername_t)+' - 投網','Handler_Download',false);
+       end;
+     end;
+     exit;
+   end;
+ end;
+ tmp_pos:=122629;
  if user^.level<NapUserModerator then
  if not StrHash_FindString(db_friends,user^.username,true) then
  begin
diff --dos -wurN 24118/localusers.pas 24119/localusers.pas
--- 24118/localusers.pas	Sun Nov 17 11:40:34 2002
+++ 24119/localusers.pas	Thu Feb 06 19:09:00 2003
@@ -55,6 +55,8 @@
   searches_count  : SmallInt;
   searchespm      : Integer;
   localstate      : TLocalUserState;
+  dlrequestsp3m   : Integer;
+  wantqueuep3m    : Integer;
   constructor Create;
   destructor Destroy; override;
   function  logged: Boolean;
diff --dos -wurN 24118/mainform.pas 24119/mainform.pas
--- 24118/mainform.pas	Wed Feb 05 02:37:12 2003
+++ 24119/mainform.pas	Thu Feb 06 19:59:24 2003
@@ -1402,6 +1402,18 @@
   domblock_hard       :=ini.ReadBool('Other2','DomBlockHard',false);
   domblock_files      :=ini.ReadInteger('Other2','DomBlockFiles',0);
   domblock_size       :=ini.ReadInteger('Other2','DomBlockSize',0);
+  dlfloodblock_count  :=ini.ReadInteger('Other2','DLFloodBlockCount',0);
+  dlfloodblock_bantime:=ini.ReadInteger('Other2','DLFloodBlockBanTime',60*60*1000);
+  str:=ini.ReadString('Other2','DLFloodBlockMethod','block');
+  if str='leech' then dlfloodblock_method:=leech
+  else if str='ban' then dlfloodblock_method:=ban
+  else dlfloodblock_method:=block;
+  wqfloodblock_count  :=ini.ReadInteger('Other2','WQFloodBlockCount',0);
+  wqfloodblock_bantime:=ini.ReadInteger('Other2','WQFloodBlockBanTime',60*60*1000);
+  str:=ini.ReadString('Other2','WQFloodBlockMethod','block');
+  if str='leech' then wqfloodblock_method:=leech
+  else if str='ban' then wqfloodblock_method:=ban
+  else wqfloodblock_method:=block;
   // set up console
   LogStartup('mainform::loadconfig: setting up console user');
   cons_channels:=TMyList.Create;
@@ -1817,6 +1829,20 @@
   ini.WriteBool('Other2','DomBlockHard',domblock_hard);
   ini.WriteInteger('Other2','DomBlockFiles',domblock_files);
   ini.WriteInteger('Other2','DomBlockSize',domblock_size);
+  ini.WriteInteger('Other2','DLFloodBlockCount',dlfloodblock_count);
+  ini.WriteInteger('Other2','DLFloodBlockBanTime',dlfloodblock_bantime);
+  case dlfloodblock_method of
+    block: ini.WriteString('Other2','DLFloodBlockMethod','block');
+    leech: ini.WriteString('Other2','DLFloodBlockMethod','leech');
+    ban  : ini.WriteString('Other2','DLFloodBlockMethod','ban');
+  end;
+  ini.WriteInteger('Other2','WQFloodBlockCount',wqfloodblock_count);
+  ini.WriteInteger('Other2','WQFloodBlockBanTime',wqfloodblock_bantime);
+  case wqfloodblock_method of
+    block: ini.WriteString('Other2','WQFloodBlockMethod','block');
+    leech: ini.WriteString('Other2','WQFloodBlockMethod','leech');
+    ban  : ini.WriteString('Other2','WQFloodBlockMethod','ban');
+  end;
   finally
   ini.Free;
  end;
diff --dos -wurN 24118/settings.dfm 24119/settings.dfm
--- 24118/settings.dfm	Wed Feb 05 02:40:30 2003
+++ 24119/settings.dfm	Thu Feb 06 01:29:54 2003
@@ -5657,10 +5657,17 @@
         object Label153: TLabel
           Left = 8
           Top = 8
-          Width = 337
+          Width = 333
           Height = 12
           Caption = 'DOM対策 : 共有数/サイズの少ない人の検索/参照/DLをブロック'
         end
+        object Label154: TLabel
+          Left = 8
+          Top = 120
+          Width = 332
+          Height = 12
+          Caption = '投網/連Q対策 : 3分間あたりのDL要求・//WantQueue回数を制限'
+        end
         object gb_searchblock: TGroupBox
           Left = 8
           Top = 24
@@ -5791,6 +5798,116 @@
             Caption = 'ノーマル'
             Enabled = False
             TabOrder = 5
+          end
+        end
+        object gb_dlfloodblock: TGroupBox
+          Left = 8
+          Top = 136
+          Width = 169
+          Height = 65
+          Caption = ' DL数制限 (0=無制限) '
+          TabOrder = 2
+          object edit_dlfloodblock: TSpinEdit
+            Left = 8
+            Top = 16
+            Width = 73
+            Height = 21
+            MaxValue = 1000
+            MinValue = 0
+            TabOrder = 0
+            Value = 0
+          end
+          object rd_dlfloodblock_block: TRadioButton
+            Left = 8
+            Top = 40
+            Width = 49
+            Height = 17
+            Caption = 'block'
+            TabOrder = 1
+            OnClick = rd_dlfloodblock_blockClick
+          end
+          object rd_dlfloodblock_leech: TRadioButton
+            Left = 64
+            Top = 40
+            Width = 49
+            Height = 17
+            Caption = 'leech'
+            TabOrder = 2
+            OnClick = rd_dlfloodblock_leechClick
+          end
+          object rd_dlfloodblock_ban: TRadioButton
+            Left = 112
+            Top = 40
+            Width = 41
+            Height = 17
+            Caption = 'ban'
+            TabOrder = 3
+            OnClick = rd_dlfloodblock_banClick
+          end
+          object edit_dlfloodblock_bantime: TComboBox
+            Left = 88
+            Top = 16
+            Width = 73
+            Height = 20
+            Style = csDropDownList
+            ItemHeight = 12
+            TabOrder = 4
+            Visible = False
+          end
+        end
+        object gb_wqfloodblock: TGroupBox
+          Left = 184
+          Top = 136
+          Width = 169
+          Height = 65
+          Caption = '//WantQueue制限 (0=無制限) '
+          TabOrder = 3
+          object edit_wqfloodblock: TSpinEdit
+            Left = 8
+            Top = 16
+            Width = 73
+            Height = 21
+            MaxValue = 1000
+            MinValue = 0
+            TabOrder = 0
+            Value = 0
+          end
+          object rd_wqfloodblock_block: TRadioButton
+            Left = 8
+            Top = 40
+            Width = 49
+            Height = 17
+            Caption = 'block'
+            TabOrder = 1
+            OnClick = rd_wqfloodblock_blockClick
+          end
+          object rd_wqfloodblock_leech: TRadioButton
+            Left = 64
+            Top = 40
+            Width = 49
+            Height = 17
+            Caption = 'leech'
+            TabOrder = 2
+            OnClick = rd_wqfloodblock_leechClick
+          end
+          object rd_wqfloodblock_ban: TRadioButton
+            Left = 112
+            Top = 40
+            Width = 41
+            Height = 17
+            Caption = 'ban'
+            TabOrder = 3
+            OnClick = rd_wqfloodblock_banClick
+          end
+          object edit_wqfloodblock_bantime: TComboBox
+            Left = 88
+            Top = 16
+            Width = 73
+            Height = 20
+            Style = csDropDownList
+            ItemHeight = 12
+            TabOrder = 4
+            Visible = False
           end
         end
       end
diff --dos -wurN 24118/settings.pas 24119/settings.pas
--- 24118/settings.pas	Wed Feb 05 03:20:02 2003
+++ 24119/settings.pas	Thu Feb 06 01:41:20 2003
@@ -554,6 +554,19 @@
     edit_domblock_files: TSpinEdit;
     edit_domblock_size: TSpinEdit;
     Label153: TLabel;
+    Label154: TLabel;
+    gb_dlfloodblock: TGroupBox;
+    rd_dlfloodblock_block: TRadioButton;
+    rd_dlfloodblock_leech: TRadioButton;
+    rd_dlfloodblock_ban: TRadioButton;
+    edit_dlfloodblock: TSpinEdit;
+    edit_dlfloodblock_bantime: TComboBox;
+    gb_wqfloodblock: TGroupBox;
+    rd_wqfloodblock_block: TRadioButton;
+    rd_wqfloodblock_leech: TRadioButton;
+    rd_wqfloodblock_ban: TRadioButton;
+    edit_wqfloodblock: TSpinEdit;
+    edit_wqfloodblock_bantime: TComboBox;
     procedure Panel3Resize(Sender: TObject);
     procedure headerPaint(Sender: TObject);
     procedure SetTopText(str: String);
@@ -623,8 +636,17 @@
     procedure cb_searchblock_chksizeClick(Sender: TObject);
     procedure cb_domblock_chkfilesClick(Sender: TObject);
     procedure cb_domblock_chksizeClick(Sender: TObject);
+    procedure rd_dlfloodblock_banClick(Sender: TObject);
+    procedure rd_dlfloodblock_blockClick(Sender: TObject);
+    procedure rd_dlfloodblock_leechClick(Sender: TObject);
+    procedure rd_wqfloodblock_banClick(Sender: TObject);
+    procedure rd_wqfloodblock_blockClick(Sender: TObject);
+    procedure rd_wqfloodblock_leechClick(Sender: TObject);
   private
     { Private declarations }
+    procedure SetBanItems(control: TComboBox);
+    function  GetBanID(control: TComboBox): Integer;
+    function  GetBanIndex(t: Integer): Integer;
   public
     { Public declarations }
     top_text: String;
@@ -772,6 +794,8 @@
  Height:=Height-90;
  for i:=0 to Ord(napSpeedT3) do
   edit_console_speed.Items.Add(Speed2Str(TNapSpeed(i)));
+ SetBanItems(edit_dlfloodblock_bantime);
+ SetBanItems(edit_wqfloodblock_bantime);
 end;
 
 procedure TSlavaNapSettings.FormShow(Sender: TObject);
@@ -1418,6 +1442,24 @@
  rd_domblock_hard.Enabled:=domblock_chkfiles and domblock_chksize;
  rd_domblock_hard.Checked:=domblock_hard;
  rd_domblock_normal.Checked:=not domblock_hard;
+
+ case dlfloodblock_method of
+   block: rd_dlfloodblock_block.Checked:=True;
+   leech: rd_dlfloodblock_leech.Checked:=True;
+   ban  : rd_dlfloodblock_ban.Checked:=True;
+ end;
+ edit_dlfloodblock.Value:=dlfloodblock_count;
+ edit_dlfloodblock_bantime.Visible:=rd_dlfloodblock_ban.Checked;
+ edit_dlfloodblock_bantime.ItemIndex:=GetBanIndex(dlfloodblock_bantime);
+
+ case wqfloodblock_method of
+   block: rd_wqfloodblock_block.Checked:=True;
+   leech: rd_wqfloodblock_leech.Checked:=True;
+   ban  : rd_wqfloodblock_ban.Checked:=True;
+ end;
+ edit_wqfloodblock.Value:=wqfloodblock_count;
+ edit_wqfloodblock_bantime.Visible:=rd_wqfloodblock_ban.Checked;
+ edit_wqfloodblock_bantime.ItemIndex:=GetBanIndex(wqfloodblock_bantime);
 end;
 
 procedure TSlavaNapSettings.sh_reportShow(Sender: TObject);
@@ -1923,6 +1965,24 @@
    domblock_files:=edit_domblock_files.Value;
    domblock_size:=edit_domblock_size.Value * MegaByte;
    domblock_hard:=rd_domblock_hard.Checked;
+
+   if rd_dlfloodblock_leech.Checked then
+     dlfloodblock_method:=leech
+   else if rd_dlfloodblock_ban.Checked then
+     dlfloodblock_method:=ban
+   else
+     dlfloodblock_method:=block;
+   dlfloodblock_count:=edit_dlfloodblock.Value;
+   dlfloodblock_bantime:=GetBanID(edit_dlfloodblock_bantime);
+
+   if rd_wqfloodblock_leech.Checked then
+     wqfloodblock_method:=leech
+   else if rd_wqfloodblock_ban.Checked then
+     wqfloodblock_method:=ban
+   else
+     wqfloodblock_method:=block;
+   wqfloodblock_count:=edit_wqfloodblock.Value;
+   wqfloodblock_bantime:=GetBanID(edit_wqfloodblock_bantime);
   except
  end;
  btn_restoreClick(nil);
@@ -2230,6 +2290,111 @@
   edit_domblock_size.Enabled    :=cb_domblock_chksize.Checked;
   rd_domblock_hard.Enabled      :=cb_domblock_chkfiles.Checked and cb_domblock_chksize.Checked;
   rd_domblock_normal.Enabled    :=cb_domblock_chkfiles.Checked and cb_domblock_chksize.Checked;
+end;
+
+procedure TSlavaNapSettings.rd_dlfloodblock_banClick(Sender: TObject);
+begin
+  edit_dlfloodblock_bantime.Visible:=True;
+end;
+
+procedure TSlavaNapSettings.rd_dlfloodblock_blockClick(Sender: TObject);
+begin
+  edit_dlfloodblock_bantime.Visible:=False;
+end;
+
+procedure TSlavaNapSettings.rd_dlfloodblock_leechClick(Sender: TObject);
+begin
+  edit_dlfloodblock_bantime.Visible:=False;
+end;
+
+procedure TSlavaNapSettings.rd_wqfloodblock_banClick(Sender: TObject);
+begin
+  edit_wqfloodblock_bantime.Visible:=True;
+end;
+
+procedure TSlavaNapSettings.rd_wqfloodblock_blockClick(Sender: TObject);
+begin
+  edit_wqfloodblock_bantime.Visible:=False;
+end;
+
+procedure TSlavaNapSettings.rd_wqfloodblock_leechClick(Sender: TObject);
+begin
+  edit_wqfloodblock_bantime.Visible:=False;
+end;
+
+procedure TSlavaNapSettings.SetBanItems(control: TComboBox);
+begin
+  control.Items.Clear;
+  control.Items.Add(GetLangI(LNG_BANS_TIME60));
+  control.Items.Add(GetLangI(LNG_BANS_TIME300));
+  control.Items.Add(GetLangI(LNG_BANS_TIME600));
+  control.Items.Add(GetLangI(LNG_BANS_TIME1800));
+  control.Items.Add(GetLangI(LNG_BANS_TIME3600));
+  control.Items.Add(GetLangI(LNG_BANS_TIME10800));
+  control.Items.Add(GetLangI(LNG_BANS_TIME43200));
+  control.Items.Add(GetLangI(LNG_BANS_TIME86400));
+  control.Items.Add(GetLangI(LNG_BANS_TIME259200));
+  control.Items.Add(GetLangI(LNG_BANS_TIME604800));
+  control.Items.Add(GetLangI(LNG_BANS_TIME1209600));
+  control.Items.Add(GetLangI(LNG_BANS_TIME2678400));
+  control.ItemIndex:=control.Items.Count-1;
+  control.Items.Add(GetLangI(LNG_BANS_TIME5184000));
+  control.Items.Add(GetLangI(LNG_BANS_TIME7776000));
+  control.Items.Add(GetLangI(LNG_BANS_TIME31536000));
+  control.Items.Add('無期限');
+  control.DropDownCount:=control.Items.Count;
+end;
+
+function  TSlavaNapSettings.GetBanID(control: TComboBox): Integer;
+var
+  t: Integer;
+begin
+  case control.ItemIndex of
+     0: t:=60;
+     1: t:=300;
+     2: t:=600;
+     3: t:=1800;
+     4: t:=3600;
+     5: t:=10800;
+     6: t:=43200;
+     7: t:=86400;
+     8: t:=259200;
+     9: t:=604800;
+    10: t:=1209600;
+    11: t:=2678400;
+    12: t:=5184000;
+    13: t:=7776000;
+    14: t:=31536000;
+    15: t:=0;
+    else t:=def_ban_timeout;
+  end;
+  Result:=t;
+end;
+
+function  TSlavaNapSettings.GetBanIndex(t: Integer): Integer;
+var
+  itemindex: Integer;
+begin
+  case t of
+          60: itemindex:=0;
+         300: itemindex:=1;
+         600: itemindex:=2;
+        1800: itemindex:=3;
+        3600: itemindex:=4;
+       10800: itemindex:=5;
+       43200: itemindex:=6;
+       86400: itemindex:=7;
+      259200: itemindex:=8;
+      604800: itemindex:=9;
+     1209600: itemindex:=10;
+     2678400: itemindex:=11;
+     5184000: itemindex:=12;
+     7776000: itemindex:=13;
+    31536000: itemindex:=14;
+           0: itemindex:=15;
+    else itemindex:=7;//1日
+  end;
+  Result:=itemindex;
 end;
 
 end.
diff --dos -wurN 24118/thread.pas 24119/thread.pas
--- 24118/thread.pas	Wed Jan 29 11:51:50 2003
+++ 24119/thread.pas	Thu Feb 06 20:59:42 2003
@@ -64,6 +64,8 @@
   procedure ResetSearchControl;
   procedure CloseSockets;
   procedure SynchronizeConsole;
+  procedure ResetWantQueueControl;
+  procedure ResetDLRequestControl;
  end;
 
 var
@@ -1259,6 +1261,8 @@
  inc(last_period180,180000);
  db_whowas.Clear;
  db_reconnect.Clear;
+ ResetWantQueueControl;
+ ResetDLRequestControl;
  tmp_pos:=1562;
  if num_servers>0 then
   for i:=0 to db_local.count-1 do
@@ -1842,6 +1846,36 @@
   except
  end;
  tmp_pos:=1607;
+end;
+
+procedure TMainThread.ResetWantQueueControl;
+var
+ i: Integer;
+ loc: TLocalUser;
+begin
+ for i:=db_local.count-1 downto 0 do
+ try
+   loc:=db_local.Items[i];
+   if loc.logged then
+    if loc.wantqueuep3m<>999 then
+     loc.wantqueuep3m:=0;
+  except
+ end;
+end;
+
+procedure TMainThread.ResetDLRequestControl;
+var
+ i: Integer;
+ loc: TLocalUser;
+begin
+ for i:=db_local.count-1 downto 0 do
+ try
+   loc:=db_local.Items[i];
+   if loc.logged then
+    if loc.dlrequestsp3m<>999 then
+     loc.dlrequestsp3m:=0;
+  except
+ end;
 end;
 
 end.
diff --dos -wurN 24118/vars.pas 24119/vars.pas
--- 24118/vars.pas	Wed Feb 05 02:31:56 2003
+++ 24119/vars.pas	Thu Feb 06 00:58:54 2003
@@ -25,6 +25,8 @@
  registered, servers, slavastrings, class_cmdlist, class_cmdexlist,
  class_doublecmdlist, class_cmd2list;
 
+type TWQBlockMethod = (block,leech,ban);
+
 var
  running, restarting, showform, closing, win98: Boolean;
  ApplicationDir: String;
@@ -301,6 +303,12 @@
  domblock_hard: Boolean;
  domblock_files: Integer;
  domblock_size: Int64;
+ dlfloodblock_count: Integer;
+ dlfloodblock_method: TWQBlockMethod;//(block,leech,ban)
+ dlfloodblock_bantime: Cardinal;
+ wqfloodblock_count: Integer;
+ wqfloodblock_method: TWQBlockMethod;//(block,leech,ban)
+ wqfloodblock_bantime: Cardinal;
 implementation
 
 procedure CheckWindows;