replyに対してタイムラインで反応
以下タイムラインをTLと略して説明します。
まずはreplyに対してTL反応(つまりは@をつけて返す反応ではない)をさせたい場合のやり方です。
まず
function makeReplyTweets
の中にある
//リプライパターンにあてはまらなかった場合はランダムに if(empty($status) && !empty($replyFile)){ $status = $this->makeTweet($replyFile); } if(empty($status) || stristr($status,"[[END]]")){ continue; } //idなどを変換 $status = $this->convertText($status, $reply); //フッターを追加 $status .= $this->_footer; //リプライ相手、リプライ元を付与
の次の行にある
$re["status"] = "@".$reply["user"]["screen_name"]." ".$status;
の行をコメントアウトするなどしてから以下を追加します。
switch(true){ //リプライ反応をTLに発言 case stristr($status, "[[TLH]]"): $status = str_replace("[[TLH]]","",$status); $re["status"] = $status; $rpid = $reply["id_str"]; $this->saveLog("latest_reply",$rpid); break; //その他 default: $re["status"] = "@".$reply["user"]["screen_name"]." ".$status; }
なお、この部分は前に紹介した半自動フォロー返し及びリムーブと併用することができます。