From 955df7c3d331d70ce78b139f1e4f490c9b2b01ef Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Thu, 27 Dec 2018 23:40:40 -0600 Subject: [PATCH 1/2] Added botname default to YAML --- bot_config.yaml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/bot_config.yaml.example b/bot_config.yaml.example index 883d036..c43d20a 100644 --- a/bot_config.yaml.example +++ b/bot_config.yaml.example @@ -1,3 +1,4 @@ +botname: 'Bob' token: '' telnet: host: '' From 8fb78ca33e0e2d369b00038e86291bbe33a76b0d Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Thu, 27 Dec 2018 23:41:03 -0600 Subject: [PATCH 2/2] fixed system variable for obtaining hostname --- run.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.rb b/run.rb index a43ed15..60f2bae 100755 --- a/run.rb +++ b/run.rb @@ -107,7 +107,7 @@ def handle_message(message) #end when '/location', '/whereareyou' if message_from_admin?(message, adm) || is_chat_authorized?(message, @auth_chat) - reply = "I am currently located at:\n\nHost: #{`echo $HOSTNAME`}ExtIP: #{`curl myip.contegix.com 2>/dev/null`}" + reply = "I am currently located at:\n\nHost: #{`echo $HOST`}ExtIP: #{`curl myip.contegix.com 2>/dev/null`}" else reply = "Refusal: I am not authorized to provide this information here." end