diff --git a/commands.rb b/commands.rb index 946161d..72bf226 100644 --- a/commands.rb +++ b/commands.rb @@ -72,7 +72,9 @@ def process_command_srvstatus(message, command, adm) if is_chat_authorized?(message, @auth_chat) || message_from_admin?(message, adm) telnet = @conf['telnet'] if `nc -zvw3 #{telnet['host']} #{telnet['port']}` + puts 'Server responded. Fetching details...' `./scripts/srvstatus.receipt #{@conf['token']} #{message.chat.id}` + STDOUT.flush end reply = `./scripts/srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}` else diff --git a/patchnotes.txt b/patchnotes.txt index ffbb3c9..7564ea2 100644 --- a/patchnotes.txt +++ b/patchnotes.txt @@ -1,4 +1,9 @@ -New features: +Patch Notes: + +v0.3.01 ++ Better server logs, round 1. + +v0.3.00 + Auto self-resurrection after random bot-suicide. + This `/patchnotes` command. + Instant message confirmation for `/status` command. diff --git a/run.rb b/run.rb index 21d5cc5..1eae39d 100755 --- a/run.rb +++ b/run.rb @@ -172,9 +172,11 @@ Telegram::Bot::Client.run(token) do |bot| elsif ! message.text.nil? bot.api.send_message(chat_id: message.chat.id, text: "#{reply}") end + STDOUT.flush else puts "Received bad data! [#{message.chat.type}]" puts validation + STDOUT.flush end end end