コード例 #1
0
 public function command_faqadd($user, $channel, $args)
 {
     echo $user;
     if (faq::isAllowed($user)) {
         $subject = $args[0];
         $this->bot->notice($user, "Added FAQ Entry for " . $subject . ".");
         $fp = fopen("faq/" . ucwords(strtolower($subject)) . ".txt", "a");
         fwrite($fp, $subject . ": " . implode(" ", array_splice($args, 1)) . "\r\n");
         fclose($fp);
     } else {
         $this->bot->notice($user, "You are not authorised to add FAQ Entrys");
     }
 }