Merge branch 'dev' of skyfall/empyrion-bot into master

dev
Aaron Johnson 6 years ago committed by Gitea
commit 2629613c15

@ -72,7 +72,9 @@ def process_command_srvstatus(message, command, adm)
if is_chat_authorized?(message, @auth_chat) || message_from_admin?(message, adm) if is_chat_authorized?(message, @auth_chat) || message_from_admin?(message, adm)
telnet = @conf['telnet'] telnet = @conf['telnet']
if `nc -zvw3 #{telnet['host']} #{telnet['port']}` if `nc -zvw3 #{telnet['host']} #{telnet['port']}`
puts 'Server responded. Fetching details...'
`./scripts/srvstatus.receipt #{@conf['token']} #{message.chat.id}` `./scripts/srvstatus.receipt #{@conf['token']} #{message.chat.id}`
STDOUT.flush
end end
reply = `./scripts/srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}` reply = `./scripts/srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}`
else else

@ -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. + Auto self-resurrection after random bot-suicide.
+ This `/patchnotes` command. + This `/patchnotes` command.
+ Instant message confirmation for `/status` command. + Instant message confirmation for `/status` command.

@ -172,9 +172,11 @@ Telegram::Bot::Client.run(token) do |bot|
elsif ! message.text.nil? elsif ! message.text.nil?
bot.api.send_message(chat_id: message.chat.id, text: "#{reply}") bot.api.send_message(chat_id: message.chat.id, text: "#{reply}")
end end
STDOUT.flush
else else
puts "Received bad data! [#{message.chat.type}]" puts "Received bad data! [#{message.chat.type}]"
puts validation puts validation
STDOUT.flush
end end
end end
end end

Loading…
Cancel
Save