2003.07.27 (日) 00:57:22 <Heracules> 本機能は、shuusei211104で削った#WinMX_v3へのWinMX v3の強制“入室”の代用となる機能です。
2003.07.27 (日) 00:57:43 <Heracules> また、振り分け入室のバグ修正も同時に行いました。
2005.11.30 (水) 15:43:34 <syumisyumi> syumisyumiです
shuusei211105: WinMX v3へのみログイン時に自動IM機能(source by Heracules)

diff --dos -urN 211104/mainform.pas 211105/mainform.pas
--- 211104/mainform.pas	Thu Jul 24 01:46:58 2003
+++ 211105/mainform.pas	Sun Jul 27 00:50:58 2003
@@ -1523,6 +1523,8 @@
   ann_delay:=ini.ReadInteger('Announcements','Timer',60);
   loginim_enabled:=ini.ReadBool('Other','LoginIMEnabled',false);
   loginim_user:=ini.ReadString('Other','LoginIMUser','LoginIMBot');
+  mx3_auto_im:=ini.ReadBool('Other','MX3AutoIMEnabled',false);
+  mx3_auto_im_text:=ini.ReadString('Other','MX3AutoIM','WinMX v3では一部機能に制限が出ます。');
   restrict_searchresult_per_user:=ini.ReadBool('Other','RestrictSearchResultPerUser',false);
   max_searchresult_per_user:=ini.ReadInteger('Other','MaxSearchResultPerUser',5);
   toami_bantime:=ini.ReadInteger('Other','ToamiBanTime',3600);
@@ -1970,6 +1972,8 @@
   ini.WriteBool('NewReport','HideHub',new_report_hide_hub);
   ini.WriteBool('Other','LoginIMEnabled',loginim_enabled);
   ini.WriteString('Other','LoginIMUser',loginim_user);
+  ini.WriteBool('Other','MX3AutoIMEnabled',mx3_auto_im);
+  ini.WriteString('Other','MX3AutoIM',mx3_auto_im_text);
   ini.WriteBool('Other','RestrictSearchResultPerUser',restrict_searchresult_per_user);
   ini.WriteInteger('Other','MaxSearchResultPerUser',max_searchresult_per_user);
   ini.WriteInteger('Other','ToamiBanTime',toami_bantime);
diff --dos -urN 211104/handler.pas 211105/handler.pas
--- 211104/handler.pas	Thu Jul 24 01:42:08 2003
+++ 211105/handler.pas	Sun Jul 27 00:40:52 2003
@@ -1248,7 +1248,16 @@
        if loginim[i]<>'' then
          local.Exec(MSG_CLIENT_PRIVMSG,loginim_user+' '+loginim[i]);
  end;
-
+ tmp_pos:=207;
+ if mx3_auto_im then
+ begin
+   if (Pos('WinMX',local.software)<>0) and (Pos('3',local.software)<>0) then
+   begin
+     if mx3_auto_im_text<>'' then
+       local.Exec(MSG_CLIENT_PRIVMSG,loginim_user+' '+mx3_auto_im_text);
+   end;
+ end;
+ tmp_pos:=208;
  if force_enter then
  begin
    if old_force_enter then
@@ -2497,6 +2506,8 @@
      AddReconnector(decode_ip(local.ip));
      DisconnectUser(local,'',GetLangT(LNG_KILLED,local.nick,local.software,'Server '+servername_t)+' - INCOMPLETEファイル所持','Handler_Share',false);
    end;
+ tmp_pos:=12263;
+ if AnsiPos('$1',rec.name)<>0 then exit;
  tmp_pos:=299;
  rec.short:=ExtractMPName(filename);
  if rec.short='' then exit;
@@ -2510,7 +2521,7 @@
   if shareinform and CanSendError(user,query) then
    local.Exec(MSG_SERVER_NOSUCH,GetLangT(LNG_SHARE_ERROR,filename));
  if force_enter and force_enter_furiwake then
-   if AnsiPos('WinMX v3',local.software)<>0 then
+   if not ((Pos('WinMX',local.software)<>0) and (Pos('3',local.software)<>0)) then
    begin
      if AnsiPos('NapDev',rec.name)>0 then
        gcmd.cmd:='#developer'
diff --dos -urN 211104/settings.pas 211105/settings.pas
--- 211104/settings.pas	Wed Jul 23 13:48:00 2003
+++ 211105/settings.pas	Sun Jul 27 00:36:06 2003
@@ -576,6 +576,8 @@
     cb_allow_teknap: TCheckBox;
     cb_regsoft_only: TCheckBox;
     cb_channels_old_forceenter: TCheckBox;
+    cb_mx3_auto_IM: TCheckBox;
+    edit_mx3_auto_IM: TEdit;
     procedure Panel3Resize(Sender: TObject);
     procedure headerPaint(Sender: TObject);
     procedure SetTopText(str: String);
@@ -648,6 +650,7 @@
     procedure sh_other4Show(Sender: TObject);
     procedure cb_allow_otherClick(Sender: TObject);
     procedure cb_channels_forceenterClick(Sender: TObject);
+    procedure cb_mx3_auto_IMClick(Sender: TObject);
   private
     { Private declarations }
     procedure SetBanItems(control: TComboBox);
@@ -1386,6 +1389,9 @@
   edit_channels_forceenter.Visible:=cb_channels_forceenter.Checked;
   cb_channels_old_forceenter.Visible:=cb_channels_forceenter.Checked;
   cb_force_enter_furiwake.Visible:=cb_channels_forceenter.Checked;
+  cb_mx3_auto_im.Checked:=mx3_auto_im;
+  edit_mx3_auto_im.Text:=mx3_auto_im_text;
+  edit_mx3_auto_im.Visible:=cb_mx3_auto_im.Checked;
   cb_restrict_searchresult_per_user.Checked:=restrict_searchresult_per_user;
   edit_max_searchresult_per_user.Value:=max_searchresult_per_user;
   edit_loginim_user.Text:=loginim_user;
@@ -1921,6 +1927,8 @@
    force_enter_channel:=edit_channels_forceenter.Text;
    old_force_enter:=cb_channels_old_forceenter.Checked;
    force_enter_furiwake:=cb_force_enter_furiwake.Checked;
+   mx3_auto_im:=cb_mx3_auto_im.Checked;
+   mx3_auto_im_text:=edit_mx3_auto_im.Text;
    restrict_searchresult_per_user:=cb_restrict_searchresult_per_user.Checked;
    max_searchresult_per_user:=edit_max_searchresult_per_user.Value;
    for i:=0 to max_loginim do
@@ -2421,6 +2429,11 @@
   edit_channels_forceenter.Visible:=cb_channels_forceenter.Checked;
   cb_channels_old_forceenter.Visible:=cb_channels_forceenter.Checked;
   cb_force_enter_furiwake.Visible:=cb_channels_forceenter.Checked;
+end;
+
+procedure TSlavaNapSettings.cb_mx3_auto_IMClick(Sender: TObject);
+begin
+  edit_mx3_auto_IM.Visible:=cb_mx3_auto_IM.Checked;
 end;
 
 end.
diff --dos -urN 211104/settings.dfm 211105/settings.dfm
--- 211104/settings.dfm	Thu Jul 24 01:39:16 2003
+++ 211105/settings.dfm	Sun Jul 27 00:36:00 2003
@@ -2323,7 +2323,7 @@
           Width = 111
           Height = 20
           Style = csDropDownList
-          ItemHeight = 12
+          ItemHeight = 0
           TabOrder = 1
         end
       end
@@ -5342,7 +5342,7 @@
         end
         object cb_force_enter_furiwake: TCheckBox
           Left = 7
-          Top = 122
+          Top = 120
           Width = 173
           Height = 15
           Caption = 'ファイル名で強制ふりわけ入室'
@@ -5358,7 +5358,7 @@
         end
         object cb_users_loginpass: TCheckBox
           Left = 7
-          Top = 138
+          Top = 154
           Width = 230
           Height = 19
           Caption = 'パスワードで入場制限 入場パスワード:'
@@ -5366,7 +5366,7 @@
         end
         object edit_users_loginpass: TEdit
           Left = 236
-          Top = 138
+          Top = 156
           Width = 112
           Height = 20
           TabOrder = 9
@@ -5374,7 +5374,7 @@
         end
         object cb_restrict_searchresult_per_user: TCheckBox
           Left = 7
-          Top = 161
+          Top = 177
           Width = 238
           Height = 18
           Caption = '同じ人が検索でヒットする数を制限:'
@@ -5382,7 +5382,7 @@
         end
         object edit_max_searchresult_per_user: TSpinEdit
           Left = 236
-          Top = 161
+          Top = 177
           Width = 112
           Height = 21
           MaxValue = 1000
@@ -5542,6 +5542,22 @@
           TabOrder = 7
           Text = '#Alternative'
         end
+        object cb_mx3_auto_IM: TCheckBox
+          Left = 7
+          Top = 136
+          Width = 138
+          Height = 17
+          Caption = 'MX3に自動でIMを送る'
+          TabOrder = 14
+          OnClick = cb_mx3_auto_IMClick
+        end
+        object edit_mx3_auto_IM: TEdit
+          Left = 236
+          Top = 134
+          Width = 112
+          Height = 20
+          TabOrder = 15
+        end
       end
       object sh_other3: TTabSheet
         Caption = 'sh_other3'
@@ -5656,7 +5672,7 @@
           Width = 66
           Height = 20
           Style = csDropDownList
-          ItemHeight = 12
+          ItemHeight = 0
           TabOrder = 5
         end
         object Panel4: TPanel
@@ -5707,7 +5723,7 @@
           Width = 66
           Height = 20
           Style = csDropDownList
-          ItemHeight = 12
+          ItemHeight = 0
           TabOrder = 7
         end
         object Panel5: TPanel
@@ -5767,7 +5783,7 @@
           Width = 66
           Height = 20
           Style = csDropDownList
-          ItemHeight = 12
+          ItemHeight = 0
           TabOrder = 10
         end
         object cb_loginblock_port: TCheckBox
diff --dos -urN 211104/vars.pas 211105/vars.pas
--- 211104/vars.pas	Wed Jul 23 05:10:04 2003
+++ 211105/vars.pas	Sat Jul 26 23:58:10 2003
@@ -263,6 +263,8 @@
  force_enter_channel: String;
  old_force_enter: Boolean;
  force_enter_furiwake: Boolean;
+ mx3_auto_im: Boolean;
+ mx3_auto_im_text: String;
  restrict_searchresult_per_user: Boolean;
  max_searchresult_per_user: Integer;
  dengon_enabled: Boolean;