2003.08.06 (水) 09:47:38 <u*j*2*6*> 一般ユーザーにプライベートチャンネルが見られるのはおかしいということで追加してみました
shuusei24171:一般ユーザーの827番コマンド(すべてのチャンネルを一覧)を拒否するオプションの追加(report by ガンプ)

diff --dos -ur 24170/constants.pas 24171/constants.pas
--- 24170/constants.pas	Tue Aug 05 23:16:54 2003
+++ 24171/constants.pas	Wed Aug 06 09:06:42 2003
@@ -27,8 +27,8 @@
  SLAVANAP_VERSION             = '2.4.1';
  SLAVANAP_BUILD               = '108';
  SLAVANAP_BUILD_DATE          = '24 January 2003';
- SLAVANAP_SHUUSEI             = '70';
- SLAVANAP_SHUUSEI_DATE        = '5 August 2003';
+ SLAVANAP_SHUUSEI             = '71';
+ SLAVANAP_SHUUSEI_DATE        = '6 August 2003';
  SLAVANAP_VERSION_SHORT       = SLAVANAP_TITLE+' '+SLAVANAP_VERSION;
  SLAVANAP_FULL                = SLAVANAP_TITLE+' '+SLAVANAP_VERSION+
                                 ' (build '+SLAVANAP_BUILD+
diff --dos -ur 24170/handler.pas 24171/handler.pas
--- 24170/handler.pas	Tue Aug 05 23:28:22 2003
+++ 24171/handler.pas	Wed Aug 06 09:23:56 2003
@@ -5475,6 +5475,11 @@
  tmp_pos:=520;
  if not isLogged then exit;
  if user=nil then exit;
+ if not listall_for_users and (user.level<napUserModerator) then
+ begin
+   PermissionDenied('',true);
+   exit;
+ end;
  tmp_pos:=521;
  for i:=0 to db_channels.count-1 do
  begin
diff --dos -ur 24170/mainform.pas 24171/mainform.pas
--- 24170/mainform.pas	Mon Apr 14 22:23:14 2003
+++ 24171/mainform.pas	Wed Aug 06 09:19:14 2003
@@ -28,7 +28,7 @@
   OfficeButtons, OfficeControls, OfficeEdit, clipbrd, channelform, chatform,
   stypes, basecombo, ComboBox, whoisform, slavastrings, mmsystem,
   Buttons, class_cmdlist, class_cmdexlist, class_doublecmdlist, Pages,
-  Classes, class_cmd2list, browseform, announceform;
+  Classes, class_cmd2list, browseform, announceform, DFWPages;
 
 type
   TSlavaNapWindow = class(TForm)
@@ -1499,6 +1499,8 @@
   for i:=0 to max_custom_allow do
    allowed_custom[i]:=ini.ReadString('Other2','AllowCustomClient'+IntToStr(i),'');
   kill_idleuser:=ini.ReadBool('Other2','KillIdleUser',false);
+  listall_for_users:=ini.ReadBool('Other2','ListAllForUsers',true);
+
   // set up console
   LogStartup('mainform::loadconfig: setting up console user');
   cons_channels:=TMyList.Create;
@@ -1978,6 +1980,7 @@
   for i:=0 to max_custom_allow do
    ini.WriteString('Other2','AllowCustomClient'+IntToStr(i),allowed_custom[i]);
   ini.WriteBool('Other2','KillIdleUser',kill_idleuser);
+  ini.WriteBool('Other2','ListAllForUsers',listall_for_users);
   finally
   ini.Free;
  end;
diff --dos -ur 24170/settings.dfm 24171/settings.dfm
--- 24170/settings.dfm	Tue Aug 05 19:47:56 2003
+++ 24171/settings.dfm	Wed Aug 06 09:16:12 2003
@@ -1055,7 +1055,7 @@
           MaxValue = 256
           MinValue = 3
           TabOrder = 2
-          Value = 0
+          Value = 3
         end
         object edit_share_duration: TSpinEdit
           Left = 244
@@ -6204,6 +6204,14 @@
           Height = 17
           Caption = 'アイドル状態のユーザーを切断'
           TabOrder = 14
+        end
+        object cb_deny_listall_for_users: TCheckBox
+          Left = 8
+          Top = 240
+          Width = 209
+          Height = 17
+          Caption = '一般ユーザーの827番コマンドを拒否'
+          TabOrder = 15
         end
       end
       object sh_other4: TDFWTabSheetes
diff --dos -ur 24170/settings.pas 24171/settings.pas
--- 24170/settings.pas	Sun Apr 13 15:30:32 2003
+++ 24171/settings.pas	Wed Aug 06 09:19:28 2003
@@ -22,7 +22,8 @@
 uses
   Windows, Messages, SysUtils, Classes2, Graphics, Controls, Forms, Dialogs,
   ExtCtrls, OfficePanel, ComCtrls, StdCtrls, inifiles, registry,
-  SpectrumCombo, ShellApi, Buttons, Spin, basecombo, Pages, Classes;
+  SpectrumCombo, ShellApi, Buttons, Spin, basecombo, Pages, Classes,
+  DFWPages;
 
 type
   TSlavaNapSettings = class(TForm)
@@ -617,6 +618,7 @@
     edit_allow_sign4: TEdit;
     cb_allow_teknap: TCheckBox;
     cb_kill_idleuser: TCheckBox;
+    cb_deny_listall_for_users: TCheckBox;
     procedure Panel3Resize(Sender: TObject);
     procedure headerPaint(Sender: TObject);
     procedure SetTopText(str: String);
@@ -1588,6 +1590,7 @@
  end;
  cb_minshare_noblockact.Checked:=minshare_noblockact;
  cb_kill_idleuser.Checked:=kill_idleuser;
+ cb_deny_listall_for_users.Checked:=not listall_for_users;
 end;
 
 procedure TSlavaNapSettings.sh_other4Show(Sender: TObject);
@@ -2187,6 +2190,7 @@
    end;
    minshare_noblockact:=cb_minshare_noblockact.Checked;
    kill_idleuser:=cb_kill_idleuser.Checked;
+   listall_for_users:=not cb_deny_listall_for_users.Checked;
   except
  end else if pages.ActivePage=sh_other4 then
  try
diff --dos -ur 24170/vars.pas 24171/vars.pas
--- 24170/vars.pas	Sun Apr 13 13:42:22 2003
+++ 24171/vars.pas	Wed Aug 06 09:07:24 2003
@@ -342,6 +342,7 @@
  'Lopster', 'XNap', 'Utatane', '2get', 'Teknap', 'Other');
  allowed_custom: Array[0..MAX_CUSTOM_ALLOW] of String;
  kill_idleuser: Boolean;
+ listall_for_users: Boolean;
 
 implementation