diff --git a/webhook.php b/webhook.php
index 98c0b91..95e53df 100644
--- a/webhook.php
+++ b/webhook.php
@@ -1,4 +1,5 @@
50) {
- send_text("Too many words.", true);
- return;
- }
+ if ($num > 50) {
+ send_text("Too many words.", true);
+ return;
+ }
$wordlist = file("/usr/share/dict/words");
for ($word=1; $word < $num; $word++) {
$words[] = $wordlist[rand(0,count($wordlist))];
@@ -205,13 +206,13 @@ function media_wiki($base_url) {
}
function coin() {
- $random = rand(0,1);
- if ($random == 1) {
- send_text('Heads', true);
- }
- else {
- send_text('Tails', true);
- }
+ $random = rand(0,1);
+ if ($random == 1) {
+ send_text('Heads', true);
+ }
+ else {
+ send_text('Tails', true);
+ }
}
function get_gif($force) {
@@ -351,7 +352,7 @@ function start() {
}
function rate() {
- send_html('Vote for me on Telegram Directory!');
+ send_html('Vote for me on Telegram Directory!');
}
function help() {
@@ -461,11 +462,11 @@ $modules = array(
);
if (!isset($decoded->{"message"}->{"text"})){
- exit();
+ exit();
}
if (isset($decoded->{"message"}->{"pinned_message"})){
- exit();
+ exit();
}
$command_list = explode(" ", $decoded->{"message"}->{"text"});