• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revisión2042 (tree)
Tiempo2017-06-11 03:25:14
Autorumethyl

Log Message

TalkBuilder::RegisterSystem()

Cambiar Resumen

Diferencia incremental

--- trunk/include/talk/talk_class.php (revision 2041)
+++ trunk/include/talk/talk_class.php (revision 2042)
@@ -389,7 +389,7 @@
389389 $talk->scene = DB::$ROOM->scene;
390390 $talk->location = TalkLocation::SYSTEM;
391391 $talk->time_stamp = Time::ConvertTimeStamp($time, false);
392- $this->Generate($talk);
392+ return $this->Generate($talk);
393393 }
394394
395395 //発言登録
@@ -604,17 +604,11 @@
604604 return $this->Register($stack);
605605 }
606606
607- //システムユーザ発言
608- private function AddSystem($str, $talk_id, $class = 'system-user') {
609- $this->cache .= TalkHTML::GenerateSystem(Text::Line($str), $talk_id, $class);
610- return true;
611- }
612-
613607 //システムメッセージ
614608 private function TalkSystem(TalkParser $talk, User $user, $name) {
615609 $str = $talk->sentence . $this->AddTime($talk);
616610 if (! isset($talk->action)) { //標準処理
617- return $this->AddSystem($str, $this->GetTalkID($talk));
611+ return $this->RegisterSystem($str, $this->GetTalkID($talk));
618612 }
619613
620614 switch ($talk->action) { //投票情報
@@ -625,7 +619,7 @@
625619
626620 case TalkAction::MORNING:
627621 case TalkAction::NIGHT:
628- return $this->AddSystem($str, $this->GetTalkID($talk));
622+ return $this->RegisterSystem($str, $this->GetTalkID($talk));
629623
630624 default: //ゲーム開始前の投票 (例:KICK) は常時表示
631625 if ($this->flag->open_talk || DB::$ROOM->IsBeforeGame()) {
@@ -639,7 +633,7 @@
639633 private function TalkDummyBoy(TalkParser $talk, User $user) {
640634 $str = Message::SYMBOL . $user->handle_name . Message::SPACER . $talk->sentence;
641635 $str = $this->QuoteTalk($str) . $this->AddTime($talk);
642- return $this->AddSystem($str, $this->GetTalkID($talk), 'dummy-boy');
636+ return $this->RegisterSystem($str, $this->GetTalkID($talk), 'dummy-boy');
643637 }
644638
645639 //昼発言
@@ -785,7 +779,13 @@
785779 return $this->Register($stack);
786780 }
787781
788- //システムメッセージ登録
782+ //発言登録 (システムユーザ)
783+ private function RegisterSystem($str, $talk_id, $class = 'system-user') {
784+ $this->cache .= TalkHTML::GenerateSystem(Text::Line($str), $talk_id, $class);
785+ return true;
786+ }
787+
788+ //発言登録 (システムメッセージ)
789789 private function RegisterSystemMessage($str, $talk_id, $class) {
790790 $this->cache .= TalkHTML::GenerateSystemMessage($str, $talk_id, $class);
791791 return true;
Show on old repository browser