2004.02.20 (金) 23:52:33 <u*j*2*6*> 設定→Other→Other3の「検索・参照応答にIPアドレスをつける」で設定をON/OFFできます
2004.02.23 (月) 18:32:57 <Heracules> あー、一回IP(or 0)をnull_ipに格納して処理減らしてるんですね(FASSでは毎回if使ってます)。
2004.02.23 (月) 18:35:21 <Heracules> あ、違った。null_ipは定数ですね。処理自体はいっしょっぽい、よかったw
2004.02.23 (月) 19:35:44 <u*j*2*6*> ただの'0'にしちゃうよりnull_ipにしたほうがあとで検索しやすいかなあとおもって

shuusei241111:NullIP(検索・参照応答でIPアドレスをつけない)をOFFにできるオプションを追加(24106参照, idea by heavy_baby)

diff --dos -urN 241110/SlavaNap.dof 241111/SlavaNap.dof
--- 241110/SlavaNap.dof	Fri Feb 20 01:53:58 2004
+++ 241111/SlavaNap.dof	Fri Feb 20 23:41:32 2004
@@ -79,8 +79,8 @@
 LegalTrademarks=http://www.slavanap.org/
 OriginalFilename=slavanap.exe
 ProductName=Delphi6でコンパイルしてあります
-ProductVersion=2.4.1.108.110
-Comments=shuusei241110:不要・重複ファイルをプロジェクトから削除(241109参照)
+ProductVersion=2.4.1.108.111
+Comments=shuusei241111:NullIP(検索・参照応答でIPアドレスをつけない)をOFFにできるオプションを追加(24106参照, idea by heavy_baby)
 [Excluded Packages]
 c:\program files\borland\delphi6\Projects\Bpl\dclusr60.bpl=Borland User Components
 c:\program files\borland\delphi6\Bin\dcl31w60.bpl=Delphi 1.0 Compatibility Components
Binary files 241110/SlavaNap.res and 241111/SlavaNap.res differ
diff --dos -urN 241110/constants.pas 241111/constants.pas
--- 241110/constants.pas	Fri Feb 20 01:53:36 2004
+++ 241111/constants.pas	Fri Feb 20 23:10:36 2004
@@ -27,7 +27,7 @@
  SLAVANAP_VERSION             = '2.4.1';
  SLAVANAP_BUILD               = '108';
  SLAVANAP_BUILD_DATE          = '24 January 2003';
- SLAVANAP_SHUUSEI             = '110';
+ SLAVANAP_SHUUSEI             = '111';
  SLAVANAP_SHUUSEI_DATE        = '20 February 2004';
  SLAVANAP_VERSION_SHORT       = SLAVANAP_TITLE+' '+SLAVANAP_VERSION;
  SLAVANAP_FULL                = SLAVANAP_TITLE+' '+SLAVANAP_VERSION+
@@ -90,6 +90,7 @@
  WINMX_DETECT_TIME            = 300000; // 5 min.
  INITIAL_JOIN_DELAY           = 3000; // 自動入室までの標準遅延時間(ミリ秒,SmallInt型)
  DefaultCryptPass             = 'himitsu';
+ null_ip                      = '0';
  // users list
  USERS_INDEX_INC              = 47;//46;
  USERS_NAME_ARRAY             = 2209;//2116;
diff --dos -urN 241110/handler.pas 241111/handler.pas
--- 241110/handler.pas	Wed Feb 18 21:05:00 2004
+++ 241111/handler.pas	Fri Feb 20 23:15:10 2004
@@ -3131,10 +3131,14 @@
               i:=sh^.index;
               if i<>-1 then str:=PNapCmd(user2.shared.dirs.Items[i])^.cmd
               else str:='';
-              if user.level>=NapUserModerator then
-                str:='"'+str+sh^.name+'" '+null_md5+' '+IntToStr(sh^.size)+' '+IntToStr(sh_bitrate)+' '+IntToStr(sh_freq)+' '+IntToStr(sh_time)+' '+user2.nick+' '+IntToStr(user2.ip)+' '+IntToStr(Ord(user2.data^.speed))
+              if disable_nullip or (user.level>=NapUserModerator) then
+                str:='"'+str+sh^.name+'" '+null_md5+' '+IntToStr(sh^.size)+' '+
+                  IntToStr(sh_bitrate)+' '+IntToStr(sh_freq)+' '+IntToStr(sh_time)+
+                  ' '+user2.nick+' '+IntToStr(user2.ip)+' '+IntToStr(Ord(user2.data^.speed))
               else
-                str:='"'+str+sh^.name+'" '+null_md5+' '+IntToStr(sh^.size)+' '+IntToStr(sh_bitrate)+' '+IntToStr(sh_freq)+' '+IntToStr(sh_time)+' '+user2.nick+' 0 '+IntToStr(Ord(user2.data^.speed));
+                str:='"'+str+sh^.name+'" '+null_md5+' '+IntToStr(sh^.size)+' '+
+                  IntToStr(sh_bitrate)+' '+IntToStr(sh_freq)+' '+IntToStr(sh_time)+
+                  ' '+user2.nick+' '+null_ip+' '+IntToStr(Ord(user2.data^.speed));
               tmp_pos:=1248;
               if search_data.ext_queue then
               begin
@@ -4103,10 +4107,10 @@
      if limit>0 then
       if j>=limit then
       begin
-        if user.level>=NapUserModerator then
+        if disable_nullip or (user.level>=NapUserModerator) then
           Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' '+IntToStr(user2^.ip))
         else
-          Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' 0');
+          Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' '+null_ip);
         total_browse_results:=total_browse_results+j;
         if log_browse then
         begin
@@ -4117,10 +4121,10 @@
       end;
     end;  
   end;
- if user.level>=NapUserModerator then
+ if disable_nullip or (user.level>=NapUserModerator) then
    Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' '+IntToStr(user2^.ip))
  else
-   Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' 0');
+   Exec(user,MSG_SERVER_BROWSE_END,gcmd.cmd+' '+null_ip);
  total_browse_results:=total_browse_results+j;
  if log_browse then
  begin
diff --dos -urN 241110/lang.pas 241111/lang.pas
--- 241110/lang.pas	Wed Feb 18 17:15:40 2004
+++ 241111/lang.pas	Fri Feb 20 22:54:34 2004
@@ -1185,6 +1185,7 @@
  LNG_S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE        = 1814;
  LNG_S_SHOTHER3_CB_SUGGEST_DBROWSE             = 1815;
  LNG_S_SHOTHER3_CB_ALLOW_RTF_CODE              = 1816;
+ LNG_S_SHOTHER3_CB_DISABLE_NULLIP              = 1817;
  LNG_S_SHOTHER4_LABEL164                       = 1821;
  LNG_S_SHOTHER4_CB_BLOCK_NAPCHAN               = 1822;
  LNG_S_SHOTHER4_CB_BLOCK_UTATANE               = 1823;
@@ -2585,6 +2586,7 @@
   GetIni(ini,LNG_S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE         ,'Settings','S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE');
   GetIni(ini,LNG_S_SHOTHER3_CB_SUGGEST_DBROWSE              ,'Settings','S_SHOTHER3_CB_SUGGEST_DBROWSE');
   GetIni(ini,LNG_S_SHOTHER3_CB_ALLOW_RTF_CODE               ,'Settings','S_SHOTHER3_CB_ALLOW_RTF_CODE');
+  GetIni(ini,LNG_S_SHOTHER3_CB_DISABLE_NULLIP               ,'Settings','S_SHOTHER3_CB_DISABLE_NULLIP');
   GetIni(ini,LNG_S_SHOTHER4_LABEL164                        ,'Settings','S_SHOTHER4_LABEL164');
   GetIni(ini,LNG_S_SHOTHER4_CB_BLOCK_NAPCHAN                ,'Settings','S_SHOTHER4_CB_BLOCK_NAPCHAN');
   GetIni(ini,LNG_S_SHOTHER4_CB_BLOCK_UTATANE                ,'Settings','S_SHOTHER4_CB_BLOCK_UTATANE');
diff --dos -urN 241110/mainform.pas 241111/mainform.pas
--- 241110/mainform.pas	Wed Feb 18 21:09:32 2004
+++ 241111/mainform.pas	Fri Feb 20 22:53:54 2004
@@ -1435,6 +1435,8 @@
   for i := 0 to list.Count - 1 do
     redirected_servers.AddCmd(StrToIntDef(list2.Strings[i], Integer(True)), list.Strings[i]);
   list2.Free;
+  disable_nullip := ini.ReadBool('Other2', 'DisableNullIP', False);
+
   // set up console
   LogStartup('mainform::loadconfig: setting up console user');
   cons_channels:=TMyList.Create;
@@ -1918,6 +1920,7 @@
   ini.WriteString('Other2', 'MetaPort', metaport);
   ini.WriteString('Other2', 'RedirectedServer', redirected_server);
   ini.WriteString('Other2', 'RedirectedServerCheckList', redirected_server_chk);
+  ini.WriteBool('Other2', 'DisableNullIP', disable_nullip);
   ini.UpdateFile;
   finally
   ini.Free;
Binary files 241110/output/SlavaNap.exe and 241111/output/SlavaNap.exe differ
diff --dos -urN 241110/output/english.lng 241111/output/english.lng
--- 241110/output/english.lng	Wed Feb 18 18:13:26 2004
+++ 241111/output/english.lng	Fri Feb 20 23:20:00 2004
@@ -7,7 +7,7 @@
 Version=2.4.1
 Comments=Original file by SlavaNap development team
 BUILD=108
-SHUUSEI=109
+SHUUSEI=111
 
 [Log]
 SERVER_INIT=Starting $1
@@ -989,6 +989,7 @@
 S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE         =Block XNap's weird filename
 S_SHOTHER3_CB_SUGGEST_DBROWSE              =Send IM to recommend direct-browse
 S_SHOTHER3_CB_ALLOW_RTF_CODE               =Allow messages in rtf-code
+S_SHOTHER3_CB_DISABLE_NULLIP               =Add IP to search/browse responses
 S_SHOTHER4_LABEL164                        =List of Japanese Clients (check to block)
 S_SHOTHER4_CB_BLOCK_NAPCHAN                =Napchan
 S_SHOTHER4_CB_BLOCK_UTATANE                =Utatane
diff --dos -urN 241110/output/japanese.lng 241111/output/japanese.lng
--- 241110/output/japanese.lng	Wed Feb 18 18:13:22 2004
+++ 241111/output/japanese.lng	Fri Feb 20 22:56:26 2004
@@ -7,7 +7,7 @@
 Version=2.4.1.108
 Comments=Translated by usj12262@hotmail.com
 BUILD=108
-SHUUSEI=109
+SHUUSEI=111
 
 [Log]
 SERVER_INIT=$1を起動中…
@@ -989,6 +989,7 @@
 S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE        =XNapの文字化け共有をブロック
 S_SHOTHER3_CB_SUGGEST_DBROWSE             =直接参照を促すメッセージを送る
 S_SHOTHER3_CB_ALLOW_RTF_CODE              =rtfコードつきのメッセージを許可する
+S_SHOTHER3_CB_DISABLE_NULLIP              =検索・参照応答にIPアドレスをつける
 S_SHOTHER4_LABEL164                       =和製クライアントのブロック (チェックするとブロックします)
 S_SHOTHER4_CB_BLOCK_NAPCHAN               =Napchan
 S_SHOTHER4_CB_BLOCK_UTATANE               =Utatane
diff --dos -urN 241110/settings.dfm 241111/settings.dfm
--- 241110/settings.dfm	Thu Feb 19 02:43:18 2004
+++ 241111/settings.dfm	Fri Feb 20 23:44:00 2004
@@ -286,7 +286,7 @@
       Top = 38
       Width = 365
       Height = 392
-      ActivePage = sh_other4
+      ActivePage = sh_other3
       Align = alClient
       MultiLine = True
       OwnerDraw = True
@@ -5962,7 +5962,7 @@
         object cb_channels_forceenter: TCheckBox
           Left = 8
           Top = 96
-          Width = 145
+          Width = 161
           Height = 17
           Caption = '強制入室(MX3.xは別室)'
           TabOrder = 1
@@ -5980,7 +5980,7 @@
         object cb_allow_2bytename: TCheckBox
           Left = 8
           Top = 112
-          Width = 201
+          Width = 233
           Height = 17
           Caption = '日本語ID・チャンネル名を許可する'
           TabOrder = 3
@@ -6005,7 +6005,7 @@
         object cb_enable_msgserv: TCheckBox
           Left = 8
           Top = 144
-          Width = 129
+          Width = 233
           Height = 17
           Caption = '伝言機能を使用する'
           TabOrder = 6
@@ -6046,7 +6046,7 @@
         object cb_minshare_noblockact: TCheckBox
           Left = 8
           Top = 176
-          Width = 217
+          Width = 233
           Height = 17
           Caption = '共有が下限以下でも検索・参照を許す'
           TabOrder = 10
@@ -6063,7 +6063,7 @@
         object cb_deny_listall_for_users: TCheckBox
           Left = 8
           Top = 208
-          Width = 209
+          Width = 233
           Height = 17
           Caption = '一般ユーザーの827番コマンドを拒否'
           TabOrder = 12
@@ -6071,7 +6071,7 @@
         object cb_block_weird_xnapfile: TCheckBox
           Left = 8
           Top = 224
-          Width = 185
+          Width = 233
           Height = 17
           Caption = 'XNapの文字化け共有をブロック'
           TabOrder = 13
@@ -6090,7 +6090,7 @@
         object cb_suggest_dbrowse: TCheckBox
           Left = 8
           Top = 240
-          Width = 193
+          Width = 233
           Height = 17
           Caption = '直接参照を促すメッセージを送る'
           TabOrder = 15
@@ -6098,10 +6098,18 @@
         object cb_allow_rtf_code: TCheckBox
           Left = 8
           Top = 256
-          Width = 201
+          Width = 233
           Height = 17
           Caption = 'rtfコードつきのメッセージを許可する'
           TabOrder = 16
+        end
+        object cb_disable_nullip: TCheckBox
+          Left = 8
+          Top = 272
+          Width = 233
+          Height = 17
+          Caption = '検索・参照応答にIPアドレスをつける'
+          TabOrder = 17
         end
       end
       object sh_other4: TTabSheet
diff --dos -urN 241110/settings.pas 241111/settings.pas
--- 241110/settings.pas	Wed Feb 18 18:03:04 2004
+++ 241111/settings.pas	Fri Feb 20 22:55:12 2004
@@ -631,6 +631,7 @@
     btn_delete_redirected_server: TButton;
     Label169: TLabel;
     edit_redirected_server: TEdit;
+    cb_disable_nullip: TCheckBox;
     procedure Panel3Resize(Sender: TObject);
     procedure headerPaint(Sender: TObject);
     procedure SetTopText(str: String);
@@ -1600,12 +1601,12 @@
  cb_block_weird_xnapfile.Checked:=block_weird_xnapfile;
  cb_suggest_dbrowse.Checked:=suggest_dbrowse;
  cb_allow_rtf_code.Checked:=allow_rtf_code;
+ cb_disable_nullip.Checked := disable_nullip;
 end;
 
 procedure TSlavaNapSettings.sh_other4Show(Sender: TObject);
 var
   I, J: Integer;
-  P: PStringHashItem;
   hostport: String;
   srv: TServer;
 begin
@@ -2231,6 +2232,7 @@
    block_weird_xnapfile:=cb_block_weird_xnapfile.Checked;
    suggest_dbrowse:=cb_suggest_dbrowse.Checked;
    allow_rtf_code:=cb_allow_rtf_code.Checked;
+   disable_nullip := cb_disable_nullip.Checked;
   except
  end else if pages.ActivePage=sh_other4 then
  try
@@ -3152,6 +3154,7 @@
   cb_block_weird_xnapfile.Caption      :=GetLangI(LNG_S_SHOTHER3_CB_BLOCK_WEIRD_XNAPFILE);
   cb_suggest_dbrowse.Caption           :=GetLangI(LNG_S_SHOTHER3_CB_SUGGEST_DBROWSE);
   cb_allow_rtf_code.Caption            :=GetLangI(LNG_S_SHOTHER3_CB_ALLOW_RTF_CODE);
+  cb_disable_nullip.Caption            :=GetLangI(LNG_S_SHOTHER3_CB_DISABLE_NULLIP);
   //sh_other4
   Label164.Caption                     :=GetLangI(LNG_S_SHOTHER4_LABEL164);
   cb_block_napchan.Caption             :=GetLangI(LNG_S_SHOTHER4_CB_BLOCK_NAPCHAN);
diff --dos -urN 241110/vars.pas 241111/vars.pas
--- 241110/vars.pas	Wed Feb 18 21:06:44 2004
+++ 241111/vars.pas	Fri Feb 20 22:46:12 2004
@@ -353,6 +353,7 @@
  redirected_server_chk: String;
  redirected_servers: TNapCmdList;
  IsSetupFailed: Boolean;
+ disable_nullip: Boolean;
 
 implementation