• R/O
  • SSH
  • HTTPS

zerochplus: Commit


Commit MetaInfo

Revisão541 (tree)
Hora2014-10-26 15:20:05
Autoriroiro

Mensagem de Log

force774

Mudança Sumário

Diff

--- codes/0ch_force774.pl (revision 540)
+++ codes/0ch_force774.pl (revision 541)
@@ -48,6 +48,11 @@
4848 'valuetype' => 3,
4949 'description' => 'キャップコテハン★は名無しを強制されない。',
5050 },
51+ 'allow_trip' => {
52+ 'default' => 0,
53+ 'valuetype' => 3,
54+ 'description' => 'トリップの装着を許可する。',
55+ },
5156 };
5257 }
5358
@@ -74,6 +79,7 @@
7479 # 設定
7580 my $owner_can_set = $this->GetConf('owner_can_set');
7681 my $cap_not_forced = $this->GetConf('cap_not_forced');
82+ my $allow_trip = $this->GetConf('allow_trip');
7783
7884 # 各種情報を取得
7985 my $name = $Form->Get('FROM');
@@ -93,9 +99,19 @@
9399 $Threads->SaveAttr($Sys);
94100 }
95101
96- my $force774 = $Threads->GetAttr($threadid, 'force774');
97- if ($force774 =~ /^!(.*)$/ && !($cap_not_forced && $kote)) {
98- $Form->Set('FROM', $1);
102+ # コテ★は影響しない
103+ if (!($cap_not_forced && $kote)) {
104+
105+ my $force774 = $Threads->GetAttr($threadid, 'force774');
106+ if ($force774 =~ /^!(.*)$/) {
107+ $Form->Set('FROM', $1);
108+ }
109+
110+ # トリップ許可
111+ if ($allow_trip && $name =~ /#|#/) {
112+ $name =~ s/^.*(#|#)/\1/;
113+ $Form->Set('FROM', $name);
114+ }
99115 }
100116
101117 return 0;
Show on old repository browser