Skip to content

Commit

Permalink
Add Jack help and Jack will speak anyway. #40
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Jul 9, 2015
1 parent 411e82b commit d5cab67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions application/controllers/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function index()

$text = $this->input->post('text');
$quote = $this->quotes[rand ( 0 , 18 )];
$result = "";
$result["text"] = $quote;

if($text === "Jack nbusers"){

Expand All @@ -51,7 +51,11 @@ function index()

$result["text"] = $this->watch->count_all() . ". " . $quote;

}
}else if($text === "Jack help"){

$result["text"] = "Jack nbusers; Jack nbmeasures; Jack nbwatches" . ". " . $quote;

}

echo json_encode($result);
}
Expand Down

0 comments on commit d5cab67

Please sign in to comment.