From 93ed944141b8ef0adbc55befe7dd22ed5cc8fbd5 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sat, 5 Jan 2019 23:32:43 +0530 Subject: [PATCH] Fix indentation. Add vim modeline. --- webhook.php | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) 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"});