2003.02.05 (水) 17:28:06 <u*j*2*6*> 入場条件の最低共有数/サイズに満たない人は、このチェックより前の段階でブロックされます
shuusei24117:DOM対策(共有数/サイズが足りない人の検索/参照をブロック)(idea by 2ndreal)

diff --dos -wurN 24116/config.pas 24117/config.pas
--- 24116/config.pas	Mon Jan 27 14:59:56 2003
+++ 24117/config.pas	Wed Feb 05 03:17:54 2003
@@ -171,6 +171,16 @@
  else if command='max_servers_enabled' then ShowVarRemote(command,max_servers_enabled,replyto, reply)
  else if command='max_servers' then ShowVarRemote(command,max_servers,replyto, reply)
  else if command='auto_startup' then ShowStartupRemote(command,replyto, reply)
+ else if command='searchblock_chkfiles' then ShowVarRemote(command,searchblock_chkfiles,replyto,reply)
+ else if command='searchblock_chksize' then ShowVarRemote(command,searchblock_chksize,replyto,reply)
+ else if command='searchblock_files' then ShowVarRemote(command,searchblock_files,replyto,reply)
+ else if command='searchblock_size' then ShowVarRemote(command,searchblock_size div MegaByte,replyto,reply)
+ else if command='searchblock_hard' then ShowVarRemote(command,searchblock_hard,replyto,reply)
+ else if command='domblock_chkfiles' then ShowVarRemote(command,domblock_chkfiles,replyto,reply)
+ else if command='domblock_chksize' then ShowVarRemote(command,domblock_chksize,replyto,reply)
+ else if command='domblock_files' then ShowVarRemote(command,domblock_files,replyto,reply)
+ else if command='domblock_size' then ShowVarRemote(command,domblock_size div MegaByte,replyto,reply)
+ else if command='domblock_hard' then ShowVarRemote(command,domblock_hard,replyto,reply)
  else  replyto.server.Exec(MSG_SRV_REMOTE_VAR_REPLY,user.username+' '+reply+' '+servername_t+' '+GetLangT(LNG_NOVAR));
 end;
 
@@ -322,6 +332,16 @@
  else if command='max_servers_enabled' then ShowVar(command,max_servers_enabled)
  else if command='max_servers' then ShowVar(command,max_servers)
  else if command='auto_startup' then ShowStartup(command)
+ else if command='searchblock_chkfiles' then ShowVar(command,searchblock_chkfiles)
+ else if command='searchblock_chksize' then ShowVar(command,searchblock_chksize)
+ else if command='searchblock_files' then ShowVar(command,searchblock_files)
+ else if command='searchblock_size' then ShowVar(command,searchblock_size div MegaByte)
+ else if command='searchblock_hard' then ShowVar(command,searchblock_hard)
+ else if command='domblock_chkfiles' then ShowVar(command,domblock_chkfiles)
+ else if command='domblock_chksize' then ShowVar(command,domblock_chksize)
+ else if command='domblock_files' then ShowVar(command,domblock_files)
+ else if command='domblock_size' then ShowVar(command,domblock_size div MegaByte)
+ else if command='domblock_hard' then ShowVar(command,domblock_hard)
  else Error(GetLangT(LNG_NOVAR), true);
 end;
 
@@ -456,7 +476,13 @@
   else if variable='hub_syncban' then Result:=SetBool(hub_syncban,b)
   else if variable='hub_syncblock' then Result:=SetBool(hub_syncblock,b)
   else if variable='auto_startup' then Result:=SetStartup(b)
-  else if variable='max_servers_enabled' then Result:=SetBool(max_servers_enabled,b);
+  else if variable='max_servers_enabled' then Result:=SetBool(max_servers_enabled,b)
+  else if variable='searchblock_chkfiles' then Result:=SetBool(searchblock_chkfiles,b)
+  else if variable='searchblock_chksize' then Result:=SetBool(searchblock_chksize,b)
+  else if variable='searchblock_hard' then Result:=SetBool(searchblock_hard,b)
+  else if variable='domblock_chkfiles' then Result:=SetBool(domblock_chkfiles,b)
+  else if variable='domblock_chksize' then Result:=SetBool(domblock_chksize,b)
+  else if variable='domblock_hard' then Result:=SetBool(domblock_hard,b);
   end;
  if i<>-1 then // integer is ok
  begin
@@ -491,7 +517,9 @@
    else if variable='min_share_bantime' then Result:=SetInt(minshare_bantime,60,60*1440,i*60)
    else if variable='timeout_remote_search' then Result:=SetCardinal(timeout_remote_search,30000,300000,i*1000)
    else if variable='max_users_per_minute' then Result:=SetInt(max_users_per_minute,0,65535,i)
-   else if variable='max_servers' then Result:=SetInt(max_servers,1,50,i);
+   else if variable='max_servers' then Result:=SetInt(max_servers,1,50,i)
+   else if variable='searchblock_files' then Result:=SetInt(searchblock_files,0,10000,i)
+   else if variable='domblock_files' then Result:=SetInt(domblock_files,0,10000,i);
  end;
  if i64<>-1 then
  begin
@@ -510,7 +538,9 @@
    else if variable='max_filesize_text' then Result:=SetInt64(maxfilesize_text,0,FileSizeLimit,i64)
    else if variable='min_filesize_mp3' then Result:=SetInt64(minfilesize_mp3,0,FileSizeLimit,i64)
    else if variable='max_filesize_mp3' then Result:=SetInt64(maxfilesize_mp3,0,FileSizeLimit,i64)
-   else if variable='min_share_size' then Result:=SetInt64(minshare_size,0,4096*MegaByte,i64*MegaByte);
+   else if variable='min_share_size' then Result:=SetInt64(minshare_size,0,4096*MegaByte,i64*MegaByte)
+   else if variable='searchblock_size' then Result:=SetInt64(searchblock_size,0,1048576*MegaByte,i64*MegaByte)
+   else if variable='domblock_size' then Result:=SetInt64(domblock_size,0,1048576*MegaByte,i64*MegaByte);
  end;
 end;
 
@@ -656,6 +686,16 @@
  db_vars.Add('max_users_per_minute'); // max logins per minute
  db_vars.Add('max_servers_enabled'); // simultaneous server link limiting enabled
  db_vars.Add('max_servers'); // limit for above
+ db_vars.Add('searchblock_chkfiles');
+ db_vars.Add('searchblock_chksize');
+ db_vars.Add('searchblock_files');
+ db_vars.Add('searchblock_size');
+ db_vars.Add('searchblock_hard');
+ db_vars.Add('domblock_chkfiles');
+ db_vars.Add('domblock_chksize');
+ db_vars.Add('domblock_files');
+ db_vars.Add('domblock_size');
+ db_vars.Add('domblock_hard');
  db_vars.Sort;
 end;
 
diff --dos -wurN 24116/handler.pas 24117/handler.pas
--- 24116/handler.pas	Wed Jan 29 11:51:54 2003
+++ 24117/handler.pas	Wed Feb 05 16:53:30 2003
@@ -2873,6 +2873,58 @@
      local.Exec(MSG_SERVER_SEARCH_END,'');
      exit;
    end;
+   tmp_pos:=122621;
+   if local.level<napUserModerator then
+   if not StrHash_FindString(db_friends,local.nick,true) then
+   begin
+     if searchblock_chkfiles and searchblock_chksize then
+     begin
+       if searchblock_hard then
+       begin
+         if local.shared.Count<searchblock_files then
+         begin
+           local.Exec(MSG_SERVER_NOSUCH,'共有ファイル数がたりないので検索できません。('
+             +IntToStr(local.shared.Count)+'/'+IntToStr(searchblock_files)+'ファイル)');
+           local.Exec(MSG_SERVER_SEARCH_END,'');
+           exit;
+         end;
+         if local.shared_size<searchblock_size then
+         begin
+           local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないので検索できません。('
+             +IntToStr(local.shared_size div Megabyte)+'/'
+             +IntToStr(searchblock_size div Megabyte)+'Mb)');
+           local.Exec(MSG_SERVER_SEARCH_END,'');
+           exit;
+         end;
+       end
+       else
+       if (local.shared.Count<searchblock_files) and
+          (local.shared_size<searchblock_size) then
+       begin
+         local.Exec(MSG_SERVER_NOSUCH,'検索できません。:ファイル数/サイズが両方たりません('
+           +IntToStr(local.shared.Count)+'/'+IntToStr(searchblock_files)+'ファイル)('
+           +IntToStr(local.shared_size div Megabyte)+'/'
+           +IntToStr(searchblock_size div Megabyte)+'Mb)');
+         local.Exec(MSG_SERVER_SEARCH_END,'');
+         exit;
+       end;
+     end
+     else if searchblock_chkfiles and (local.shared.Count<searchblock_files) then
+     begin
+       local.Exec(MSG_SERVER_NOSUCH,'共有ファイル数がたりないので検索できません。('
+         +IntToStr(local.shared.Count)+'/'+IntToStr(searchblock_files)+'ファイル)');
+       local.Exec(MSG_SERVER_SEARCH_END,'');
+       exit;
+     end
+     else if searchblock_chksize and (local.shared_size<searchblock_size) then
+     begin
+       local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないので検索できません。('
+         +IntToStr(local.shared_size div Megabyte)+'/'
+         +IntToStr(searchblock_size div Megabyte)+'Mb)');
+       local.Exec(MSG_SERVER_SEARCH_END,'');
+       exit;
+     end;
+   end;
    inc(local.searchespm);
  end
  else
@@ -2888,6 +2940,18 @@
      user^.server.Exec(MSG_SRV_SEARCH_END,user^.username);
      exit;
    end;
+   tmp_pos:=122622;
+   if searchblock_chkfiles then
+   if user^.shared<searchblock_files then
+   if user^.level<napUserModerator then
+   if not StrHash_FindString(db_friends,user^.username,true) then
+   begin
+     Exec(user,MSG_SERVER_NOSUCH,'<'+servername_t
+       +'> 共有ファイル数がたりないのでリモート検索できません。('
+       +IntToStr(user^.shared)+'/'+IntToStr(searchblock_files)+'ファイル)');
+     user^.server.Exec(MSG_SERVER_SEARCH_END,user^.username);
+     exit;
+   end;
    tmp_pos:=365;
    SplitString(gcmd.cmd,hlist);
  end;
@@ -3167,6 +3231,62 @@
  if not CheckParams(2) then exit;
  if (query<>queryNormal) and (query<>queryRemoteUser) then exit;
  if user=nil then exit;
+ 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]+'はDL要求できません');
+   exit;
+ end;
+ tmp_pos:=122622;
+ if user^.level<NapUserModerator then
+ if not StrHash_FindString(db_friends,user^.username,true) then
+ begin
+   if domblock_chkfiles and domblock_chksize then
+   begin
+     if domblock_hard then
+     begin
+       if user^.shared<domblock_files then
+       begin
+         Error('共有ファイル数がたりないのでDLできません。('
+           +IntToStr(user^.shared)+'/'+IntToStr(domblock_files)+'ファイル)',true);
+         exit;
+       end;
+       if (local<>nil) and (local.shared_size<=domblock_size) then
+       begin
+         local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないのでDLできません。('
+           +IntToStr(local.shared_size div Megabyte)+'/'
+           +IntToStr(domblock_size div Megabyte)+'Mb)');
+         exit;
+       end;
+     end
+     else
+     if (user^.shared<domblock_files) and
+        (local<>nil) and (local.shared_size<=domblock_size) then
+     begin
+       local.Exec(MSG_SERVER_NOSUCH,'DLできません。:ファイル数/サイズが両方たりません('
+         +IntToStr(local.shared.Count)+'/'+IntToStr(domblock_files)+'ファイル)('
+         +IntToStr(local.shared_size div Megabyte)+'/'
+         +IntToStr(domblock_size div Megabyte)+'Mb)');
+       exit;
+     end;
+   end
+   else
+   if domblock_chkfiles and (user^.shared<domblock_files) then
+   begin
+     Error('共有ファイル数がたりないのでDLできません。('
+       +IntToStr(user^.shared)+'/'+IntToStr(domblock_files)+'ファイル)',true);
+     exit;
+   end
+   else
+   if domblock_chksize and (local<>nil) and (local.shared_size<=domblock_size) then
+   begin
+     local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないのでDLできません。('
+       +IntToStr(local.shared_size div Megabyte)+'/'
+       +IntToStr(domblock_size div Megabyte)+'Mb)');
+     exit;
+   end;
+ end;
  tmp_pos:=401;
  user2:=db_online.FindUser(hlist.Strings[0]);
  if user2=nil then
@@ -3387,6 +3507,59 @@
    begin
      local.Exec(MSG_SERVER_BROWSE_END,gcmd.cmd);
      inc(local.searchespm);
+     exit;
+   end;
+ end;
+ tmp_pos:=12262;
+ if user^.username<>gcmd.cmd then
+ if user^.level<napUserModerator then
+ if not StrHash_FindString(db_friends,user^.username,true) then
+ begin
+   if domblock_chkfiles and domblock_chksize then
+   begin
+     if domblock_hard then
+     begin
+       if (user^.shared<domblock_files) then
+       begin
+         Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd);
+         Exec(user,MSG_SERVER_NOSUCH,'<'+servername_t
+           +'> 共有ファイル数がたりないので参照できません。('
+           +IntToStr(user^.shared)+'/'+IntToStr(domblock_files)+'ファイル)');
+         exit;
+       end;
+       if (local<>nil) and (local.shared_size<=domblock_size) then
+       begin
+         local.Exec(MSG_SERVER_BROWSE_END,gcmd.cmd);
+         local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないので参照できません。('
+           +IntToStr(local.shared_size div Megabyte)+'/'
+           +IntToStr(domblock_size div Megabyte)+'Mb)');
+         exit;
+       end;
+     end
+     else
+     if (user^.shared<domblock_files) and
+        (local<>nil) and (local.shared_size<=domblock_size) then
+     begin
+       local.Exec(MSG_SERVER_BROWSE_END,gcmd.cmd);
+       local.Exec(MSG_SERVER_NOSUCH,'参照できません。:ファイル数/サイズが両方たりません('
+         +IntToStr(local.shared.Count)+'/'+IntToStr(domblock_files)+'ファイル)('
+         +IntToStr(local.shared_size div Megabyte)+'/'+IntToStr(domblock_size div Megabyte)+'Mb)');
+       exit;
+     end;
+   end
+   else if domblock_chkfiles and (user^.shared<domblock_files) then
+   begin
+     Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd);
+     Exec(user,MSG_SERVER_NOSUCH,'<'+servername_t+'> 共有ファイル数がたりないので参照できません。('
+       +IntToStr(user^.shared)+'/'+IntToStr(domblock_files)+'ファイル)');
+     exit;
+   end
+   else if domblock_chksize and (local<>nil) and (local.shared_size<=domblock_size) then
+   begin
+     local.Exec(MSG_SERVER_BROWSE_END,gcmd.cmd);
+     local.Exec(MSG_SERVER_NOSUCH,'共有ファイルサイズがたりないので参照できません。('
+       +IntToStr(local.shared_size div Megabyte)+'/'
+       +IntToStr(domblock_size div Megabyte)+'Mb)');
      exit;
    end;
  end;
diff --dos -wurN 24116/mainform.pas 24117/mainform.pas
--- 24116/mainform.pas	Sat Feb 01 16:59:20 2003
+++ 24117/mainform.pas	Wed Feb 05 02:37:12 2003
@@ -1391,6 +1391,17 @@
   ann_enabled:=ini.ReadBool('Announcements','Enabled',false);
   ann_user:=ini.ReadString('Announcements','User','AnnouncementsBot');
   ann_delay:=ini.ReadInteger('Announcements','Timer',60);
+  // other2
+  searchblock_chkfiles:=ini.ReadBool('Other2','SearchBlockByFiles',false);
+  searchblock_chksize :=ini.ReadBool('Other2','SearchBlockBySize',false);
+  searchblock_hard    :=ini.ReadBool('Other2','SearchBlockHard',false);
+  searchblock_files   :=ini.ReadInteger('Other2','SearchBlockFiles',0);
+  searchblock_size    :=ini.ReadInteger('Other2','SearchBlockSize',0);
+  domblock_chkfiles   :=ini.ReadBool('Other2','DomBlockByFiles',false);
+  domblock_chksize    :=ini.ReadBool('Other2','DomBlockBySize',false);
+  domblock_hard       :=ini.ReadBool('Other2','DomBlockHard',false);
+  domblock_files      :=ini.ReadInteger('Other2','DomBlockFiles',0);
+  domblock_size       :=ini.ReadInteger('Other2','DomBlockSize',0);
   // set up console
   LogStartup('mainform::loadconfig: setting up console user');
   cons_channels:=TMyList.Create;
@@ -1795,6 +1806,17 @@
   ini.WriteBool('NewReport','Enabled',new_report_enabled);
   ini.WriteInteger('NewReport','Port',new_report_port);
   ini.WriteBool('NewReport','HideHub',new_report_hide_hub);
+  // other2
+  ini.WriteBool('Other2','SearchBlockByFiles',searchblock_chkfiles);
+  ini.WriteBool('Other2','SearchBlockBySize',searchblock_chksize);
+  ini.WriteBool('Other2','SearchBlockHard',searchblock_hard);
+  ini.WriteInteger('Other2','SearchBlockFiles',searchblock_files);
+  ini.WriteInteger('Other2','SearchBlockSize',searchblock_size);
+  ini.WriteBool('Other2','DomBlockByFiles',domblock_chkfiles);
+  ini.WriteBool('Other2','DomBlockBySize',domblock_chksize);
+  ini.WriteBool('Other2','DomBlockHard',domblock_hard);
+  ini.WriteInteger('Other2','DomBlockFiles',domblock_files);
+  ini.WriteInteger('Other2','DomBlockSize',domblock_size);
   finally
   ini.Free;
  end;
diff --dos -wurN 24116/settings.dfm 24117/settings.dfm
--- 24116/settings.dfm	Tue Jan 28 00:46:18 2003
+++ 24117/settings.dfm	Wed Feb 05 02:40:30 2003
@@ -285,7 +285,7 @@
       Top = 38
       Width = 365
       Height = 392
-      ActivePage = sh_links
+      ActivePage = sh_other2
       Align = alClient
       MultiLine = True
       OwnerDraw = True
@@ -1922,7 +1922,7 @@
           Width = 156
           Height = 20
           Style = csDropDownList
-          ItemHeight = 0
+          ItemHeight = 12
           TabOrder = 9
         end
       end
@@ -2435,7 +2435,7 @@
           Width = 111
           Height = 20
           Style = csDropDownList
-          ItemHeight = 0
+          ItemHeight = 12
           TabOrder = 1
         end
         object Edit_cons_autojoin1: TEdit
@@ -5494,7 +5494,7 @@
           Width = 156
           Height = 20
           Style = csDropDownList
-          ItemHeight = 0
+          ItemHeight = 12
           TabOrder = 9
         end
       end
@@ -5644,6 +5644,154 @@
           Height = 15
           Caption = 'mods+の共有ファイルをチェックする'
           TabOrder = 2
+        end
+      end
+      object sh_other2: TDFWTabSheetes
+        Caption = 'sh_other2'
+        TabVisible = False
+        OnShow = sh_other2Show
+        TabColor = clBtnFace
+        TabFontColor = clBlack
+        BevelInner = bvNone
+        BevelOuter = bvNone
+        object Label153: TLabel
+          Left = 8
+          Top = 8
+          Width = 337
+          Height = 12
+          Caption = 'DOM対策 : 共有数/サイズの少ない人の検索/参照/DLをブロック'
+        end
+        object gb_searchblock: TGroupBox
+          Left = 8
+          Top = 24
+          Width = 169
+          Height = 81
+          Caption = ' 検索ブロック '
+          TabOrder = 0
+          object cb_searchblock_chkfiles: TCheckBox
+            Left = 8
+            Top = 16
+            Width = 65
+            Height = 17
+            Caption = '共有数'
+            TabOrder = 0
+            OnClick = cb_searchblock_chkfilesClick
+          end
+          object cb_searchblock_chksize: TCheckBox
+            Left = 8
+            Top = 38
+            Width = 81
+            Height = 17
+            Caption = 'サイズ(Mb)'
+            TabOrder = 1
+            OnClick = cb_searchblock_chksizeClick
+          end
+          object rd_searchblock_hard: TRadioButton
+            Left = 8
+            Top = 59
+            Width = 73
+            Height = 17
+            Caption = 'ハード'
+            Enabled = False
+            TabOrder = 2
+          end
+          object rd_searchblock_normal: TRadioButton
+            Left = 80
+            Top = 59
+            Width = 73
+            Height = 17
+            Caption = 'ノーマル'
+            Enabled = False
+            TabOrder = 3
+          end
+          object edit_searchblock_files: TSpinEdit
+            Left = 88
+            Top = 14
+            Width = 73
+            Height = 21
+            Enabled = False
+            MaxValue = 10000
+            MinValue = 0
+            TabOrder = 4
+            Value = 0
+          end
+          object edit_searchblock_size: TSpinEdit
+            Left = 88
+            Top = 36
+            Width = 73
+            Height = 21
+            Enabled = False
+            MaxValue = 10000
+            MinValue = 0
+            TabOrder = 5
+            Value = 0
+          end
+        end
+        object gb_domblock: TGroupBox
+          Left = 184
+          Top = 24
+          Width = 169
+          Height = 81
+          Caption = ' 参照/キューブロック '
+          TabOrder = 1
+          object cb_domblock_chkfiles: TCheckBox
+            Left = 8
+            Top = 16
+            Width = 65
+            Height = 17
+            Caption = '共有数'
+            TabOrder = 0
+            OnClick = cb_domblock_chkfilesClick
+          end
+          object edit_domblock_files: TSpinEdit
+            Left = 88
+            Top = 14
+            Width = 73
+            Height = 21
+            Enabled = False
+            MaxValue = 10000
+            MinValue = 0
+            TabOrder = 1
+            Value = 0
+          end
+          object cb_domblock_chksize: TCheckBox
+            Left = 8
+            Top = 38
+            Width = 81
+            Height = 17
+            Caption = 'サイズ(Mb)'
+            TabOrder = 2
+            OnClick = cb_domblock_chksizeClick
+          end
+          object edit_domblock_size: TSpinEdit
+            Left = 88
+            Top = 36
+            Width = 73
+            Height = 21
+            Enabled = False
+            MaxValue = 10000
+            MinValue = 0
+            TabOrder = 3
+            Value = 0
+          end
+          object rd_domblock_hard: TRadioButton
+            Left = 8
+            Top = 59
+            Width = 73
+            Height = 17
+            Caption = 'ハード'
+            Enabled = False
+            TabOrder = 4
+          end
+          object rd_domblock_normal: TRadioButton
+            Left = 80
+            Top = 59
+            Width = 73
+            Height = 17
+            Caption = 'ノーマル'
+            Enabled = False
+            TabOrder = 5
+          end
         end
       end
     end
diff --dos -wurN 24116/settings.pas 24117/settings.pas
--- 24116/settings.pas	Tue Jan 28 13:18:16 2003
+++ 24117/settings.pas	Wed Feb 05 03:20:02 2003
@@ -538,6 +538,22 @@
     Label152: TLabel;
     edit_interface_remotepass: TEdit;
     cb_blockmx_ban: TCheckBox;
+    sh_other2: TDFWTabSheetes;
+    gb_searchblock: TGroupBox;
+    cb_searchblock_chkfiles: TCheckBox;
+    cb_searchblock_chksize: TCheckBox;
+    rd_searchblock_hard: TRadioButton;
+    rd_searchblock_normal: TRadioButton;
+    edit_searchblock_files: TSpinEdit;
+    edit_searchblock_size: TSpinEdit;
+    gb_domblock: TGroupBox;
+    cb_domblock_chkfiles: TCheckBox;
+    cb_domblock_chksize: TCheckBox;
+    rd_domblock_hard: TRadioButton;
+    rd_domblock_normal: TRadioButton;
+    edit_domblock_files: TSpinEdit;
+    edit_domblock_size: TSpinEdit;
+    Label153: TLabel;
     procedure Panel3Resize(Sender: TObject);
     procedure headerPaint(Sender: TObject);
     procedure SetTopText(str: String);
@@ -602,6 +618,11 @@
     procedure cb_interface_remoteadminokClick(Sender: TObject);
     procedure cb_blockmx_detectClick(Sender: TObject);
     procedure cb_blockmx_banClick(Sender: TObject);
+    procedure sh_other2Show(Sender: TObject);
+    procedure cb_searchblock_chkfilesClick(Sender: TObject);
+    procedure cb_searchblock_chksizeClick(Sender: TObject);
+    procedure cb_domblock_chkfilesClick(Sender: TObject);
+    procedure cb_domblock_chksizeClick(Sender: TObject);
   private
     { Private declarations }
   public
@@ -652,6 +673,7 @@
  DATA_DAGSTA        = pointer(28);
  DATA_BLOCKEDMX     = pointer(29);
  DATA_BLOCKS        = pointer(30);
+ DATA_OTHER2        = pointer(31);
 
 procedure TSlavaNapSettings.CreateParams(Var params: TCreateParams);
 begin
@@ -827,6 +849,8 @@
        item.data:=DATA_OTHER;
        t:=tree.Items.AddChild(item,GetLangI(LNG_S_ITEM_REPORT));
        t.data:=DATA_REPORT;
+       t:=tree.Items.AddChild(item,'Other2');
+       t.Data:=DATA_OTHER2;
  item.Expand(true);
  it1.Expand(true); // expand first item and focus it
 end;
@@ -891,7 +915,8 @@
  else if node.data=DATA_SHARE_MINSHARE then pages.ActivePage:=sh_minshare
  else if node.data=DATA_MOTD then pages.ActivePage:=sh_motd
  else if node.data=DATA_COLORS then pages.ActivePage:=sh_colors
- else if node.data=DATA_LINKS2 then pages.ActivePage:=sh_links2;
+ else if node.data=DATA_LINKS2 then pages.ActivePage:=sh_links2
+ else if node.data=DATA_OTHER2 then pages.ActivePage:=sh_other2;
 end;
 
 procedure TSlavaNapSettings.cb_users_reg_onlyClick(Sender: TObject);
@@ -1371,6 +1396,30 @@
    edit_ann_messages.Lines.Add(ann_messages[i]);
 end;
 
+procedure TSlavaNapSettings.sh_other2Show(Sender: TObject);
+begin
+ SetTopText('その他の設定2');
+ SetChange(true);
+
+ cb_searchblock_chkfiles.Checked:=searchblock_chkfiles;
+ cb_searchblock_chksize.Checked:=searchblock_chksize;
+ edit_searchblock_files.Value:=searchblock_files;
+ edit_searchblock_size.Value:=searchblock_size div MegaByte;
+ rd_searchblock_hard.Enabled:=searchblock_chkfiles and searchblock_chksize;
+ rd_searchblock_hard.Enabled:=searchblock_chkfiles and searchblock_chksize;
+ rd_searchblock_hard.Checked:=searchblock_hard;
+ rd_searchblock_normal.Checked:=not searchblock_hard;
+
+ cb_domblock_chkfiles.Checked:=domblock_chkfiles;
+ cb_domblock_chksize.Checked:=domblock_chksize;
+ edit_domblock_files.Value:=domblock_files;
+ edit_domblock_size.Value:=domblock_size div MegaByte;
+ rd_domblock_hard.Enabled:=domblock_chkfiles and domblock_chksize;
+ rd_domblock_hard.Enabled:=domblock_chkfiles and domblock_chksize;
+ rd_domblock_hard.Checked:=domblock_hard;
+ rd_domblock_normal.Checked:=not domblock_hard;
+end;
+
 procedure TSlavaNapSettings.sh_reportShow(Sender: TObject);
 begin
  SetTopText(GetLangI(LNG_S_TEXT_REPORT));
@@ -1861,6 +1910,20 @@
    if running then
     cmd_list.AddDoubleCmd(MSG_CMD_MOTDCHANGE,0,'','');
   except
+ end else if pages.ActivePage=sh_other2 then
+ try
+   searchblock_chkfiles:=cb_searchblock_chkfiles.Checked;
+   searchblock_chksize:=cb_searchblock_chksize.Checked;
+   searchblock_files:=edit_searchblock_files.Value;
+   searchblock_size:=edit_searchblock_size.Value * MegaByte;
+   searchblock_hard:=rd_searchblock_hard.Checked;
+
+   domblock_chkfiles:=cb_domblock_chkfiles.Checked;
+   domblock_chksize:=cb_domblock_chksize.Checked;
+   domblock_files:=edit_domblock_files.Value;
+   domblock_size:=edit_domblock_size.Value * MegaByte;
+   domblock_hard:=rd_domblock_hard.Checked;
+  except
  end;
  btn_restoreClick(nil);
 end;
@@ -2139,6 +2202,34 @@
 begin
  Label142.Visible:=cb_blockmx_ban.Checked;
  edit_blockmx_bantime.Visible:=cb_blockmx_ban.Checked;
+end;
+
+procedure TSlavaNapSettings.cb_searchblock_chkfilesClick(Sender: TObject);
+begin
+  edit_searchblock_files.Enabled:=cb_searchblock_chkfiles.Checked;
+  rd_searchblock_hard.Enabled   :=cb_searchblock_chkfiles.Checked and cb_searchblock_chksize.Checked;
+  rd_searchblock_normal.Enabled :=cb_searchblock_chkfiles.Checked and cb_searchblock_chksize.Checked;
+end;
+
+procedure TSlavaNapSettings.cb_searchblock_chksizeClick(Sender: TObject);
+begin
+  edit_searchblock_size.Enabled :=cb_searchblock_chksize.Checked;
+  rd_searchblock_hard.Enabled   :=cb_searchblock_chkfiles.Checked and cb_searchblock_chksize.Checked;
+  rd_searchblock_normal.Enabled :=cb_searchblock_chkfiles.Checked and cb_searchblock_chksize.Checked;
+end;
+
+procedure TSlavaNapSettings.cb_domblock_chkfilesClick(Sender: TObject);
+begin
+  edit_domblock_files.Enabled   :=cb_domblock_chkfiles.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.cb_domblock_chksizeClick(Sender: TObject);
+begin
+  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;
 
 end.
diff --dos -wurN 24116/vars.pas 24117/vars.pas
--- 24116/vars.pas	Wed Jan 29 11:51:46 2003
+++ 24117/vars.pas	Wed Feb 05 02:31:56 2003
@@ -290,7 +290,17 @@
  slChatMyMessage,
  slBackground,
  slText: Integer;
-
+ // other
+ searchblock_chkfiles: Boolean;
+ searchblock_chksize: Boolean;
+ searchblock_hard: Boolean;
+ searchblock_files: Integer;
+ searchblock_size: Int64;
+ domblock_chkfiles: Boolean;
+ domblock_chksize: Boolean;
+ domblock_hard: Boolean;
+ domblock_files: Integer;
+ domblock_size: Int64;
 implementation
 
 procedure CheckWindows;