2003.08.10 (日) 23:32:13 <u*j*2*6*> 日本語のチャンネルをふくめるときは、「日本語ID・チャンネル名を許可する」にチェックを入れてください
shuusei24180:強制入室のチャンネルを複数指定できるようにする(24136参照,idea by hari)

diff --dos -ur 24179/constants.pas 24180/constants.pas
--- 24179/constants.pas	Sun Aug 10 20:27:48 2003
+++ 24180/constants.pas	Sun Aug 10 20:53:52 2003
@@ -27,7 +27,7 @@
  SLAVANAP_VERSION             = '2.4.1';
  SLAVANAP_BUILD               = '108';
  SLAVANAP_BUILD_DATE          = '24 January 2003';
- SLAVANAP_SHUUSEI             = '79';
+ SLAVANAP_SHUUSEI             = '80';
  SLAVANAP_SHUUSEI_DATE        = '10 August 2003';
  SLAVANAP_VERSION_SHORT       = SLAVANAP_TITLE+' '+SLAVANAP_VERSION;
  SLAVANAP_FULL                = SLAVANAP_TITLE+' '+SLAVANAP_VERSION+
diff --dos -ur 24179/mainform.pas 24180/mainform.pas
--- 24179/mainform.pas	Sun Aug 10 17:42:52 2003
+++ 24180/mainform.pas	Sun Aug 10 22:38:54 2003
@@ -1477,6 +1477,8 @@
   StrHash_Clear(cons_friends);
   force_enter:=ini.ReadBool('Other2','ForceEnter',false);
   force_enter_channel:=ini.ReadString('Other2','ForceEnterChannel','#Alternative');
+  StrHash_Reset(force_enter_channel_list);
+  SplitString(force_enter_channel,force_enter_channel_list);
   allow_2bytename:=ini.ReadBool('Other2','Allow2ByteName',false);
   check_loginpass:=ini.ReadBool('Other2','CheckLoginPass',false);
   loginpass:=ini.ReadString('Other2','LoginPass','');
diff --dos -ur 24179/settings.pas 24180/settings.pas
--- 24179/settings.pas	Sun Aug 10 19:09:12 2003
+++ 24180/settings.pas	Sun Aug 10 23:23:10 2003
@@ -23,7 +23,7 @@
   Windows, Messages, SysUtils, Classes2, Graphics, Controls, Forms, Dialogs,
   ExtCtrls, OfficePanel, ComCtrls, StdCtrls, inifiles, registry,
   SpectrumCombo, ShellApi, Buttons, Spin, basecombo, Pages, Classes,
-  DFWPages, ActiveX, ShlObj;
+  DFWPages, ActiveX, ShlObj, slavastrings;
 
 type
   TSlavaNapSettings = class(TForm)
@@ -1715,6 +1715,8 @@
  reg: TRegistry;
  i: Integer;
  logfilename: String;
+ p: PStringHashItem;
+ ch: TChannel;
 begin
  if pages.ActivePage=sh_main then
  try
@@ -2189,6 +2191,19 @@
        loginim[i]:=Trim(edit_loginim.Lines.Strings[i]);
    force_enter:=cb_channels_forceenter.Checked;
    force_enter_channel:=edit_channels_forceenter.Text;
+   StrHash_Reset(force_enter_channel_list);
+   SplitString(force_enter_channel,force_enter_channel_list);
+   p:=force_enter_channel_list.first;
+   while p<>nil do
+   begin
+     if FindChannel(p^.data)=nil then
+     begin
+       ch:=TChannel.Create(p^.data);
+       Include(ch.state,chRegistered);
+       db_channels.Add(ch);
+     end;
+     p:=p^.next;
+   end;
    allow_2bytename:=cb_allow_2bytename.Checked;
    check_loginpass:=cb_check_loginpass.Checked;
    loginpass:=edit_loginpass.Text;
diff --dos -ur 24179/thread.pas 24180/thread.pas
--- 24179/thread.pas	Sun Aug 10 19:18:58 2003
+++ 24180/thread.pas	Sun Aug 10 23:05:12 2003
@@ -380,6 +380,7 @@
   StrHash_Clear(ext_app_list);
   StrHash_Clear(ext_cd_list);
   StrHash_Clear(fakeext_list);
+  StrHash_Clear(force_enter_channel_list);
   {$I checksync.pas}
   FreeBlocks;
  DebugLog('ShutDown - 14',true);
@@ -1993,9 +1994,10 @@
 
 procedure TMainThread.CheckForceEnter;
 var
- i: Integer;
+ i,j: Integer;
  loc: TLocalUser;
  t: Cardinal;
+ p: PStringHashItem;
 begin
   tmp_pos:=12267;
   if not force_enter then exit;
@@ -2014,10 +2016,20 @@
     begin
       if (Pos('WinMX',loc.software)<>0) and
          (Pos('3',loc.software)<>0) then
-        gcmd.cmd:='#WinMX_v3.x' //WinMX3.xの隔離部屋
+      begin
+        gcmd.cmd:='#WinMX_v3.x'; //WinMX3.xの隔離部屋
+        Handler_JoinChannel;
+      end
       else
-        gcmd.cmd:=force_enter_channel;
-      Handler_JoinChannel;
+      begin
+        p:=force_enter_channel_list.first;
+        while p<>nil do
+        begin
+          gcmd.cmd:=p^.data;
+          Handler_JoinChannel;
+          p:=p^.next;
+        end;
+      end;
     end;
   end;
   tmp_pos:=12270;
diff --dos -ur 24179/vars.pas 24180/vars.pas
--- 24179/vars.pas	Sun Aug 10 17:39:16 2003
+++ 24180/vars.pas	Sun Aug 10 21:04:24 2003
@@ -327,6 +327,7 @@
  loginim: Array[0..MAX_LOGINIM] of String;
  force_enter: Boolean;
  force_enter_channel: String;
+ force_enter_channel_list: TStringHash;
  allow_2bytename: Boolean;
  check_loginpass: Boolean;
  loginpass: String;