From a7a88a7886b2051397289673c182e042e24b02e6 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Thu, 27 Dec 2018 01:28:49 -0600 Subject: [PATCH] Renamed main executable and organized scripts into a directory --- commands.rb | 4 ++-- empyrion-bot.rb => run.rb | 2 +- srvstart => scripts/srvstart | 0 srvstart.expect => scripts/srvstart.expect | 0 srvstatus => scripts/srvstatus | 0 srvstatus.expect => scripts/srvstatus.expect | 0 srvstop => scripts/srvstop | 0 7 files changed, 3 insertions(+), 3 deletions(-) rename empyrion-bot.rb => run.rb (98%) rename srvstart => scripts/srvstart (100%) rename srvstart.expect => scripts/srvstart.expect (100%) rename srvstatus => scripts/srvstatus (100%) rename srvstatus.expect => scripts/srvstatus.expect (100%) rename srvstop => scripts/srvstop (100%) diff --git a/commands.rb b/commands.rb index 7183c16..c1cb47f 100644 --- a/commands.rb +++ b/commands.rb @@ -37,7 +37,7 @@ def process_command_srvstart(message, command, adm) return "Refusal: Although I respect your wishes, master, I am not authorized to perform this function for this group." else telnet = @conf['telnet'] - puts `./srvstart #{telnet['host']}` + puts `./scripts/srvstart #{telnet['host']}` #return "Starting up the Empyrion service." return "This function is currently broken. An attempt was made, but odds are against the server having actually started.\n\n" + "Use /status for more info." @@ -58,7 +58,7 @@ def process_command_srvstop(message, command, adm) return "Refusal: Although I respect your wishes, master, I am not authorized to perform this function for this group." else telnet = @conf['telnet'] - `./srvstop #{telnet['host']} #{telnet['port']} #{telnet['pass']}` + `./scripts/srvstop #{telnet['host']} #{telnet['port']} #{telnet['pass']}` return "Affirmation: I am shutting down the Empyrion service." end end diff --git a/empyrion-bot.rb b/run.rb similarity index 98% rename from empyrion-bot.rb rename to run.rb index 3ac85e2..ed0d4b8 100755 --- a/empyrion-bot.rb +++ b/run.rb @@ -108,7 +108,7 @@ def handle_message(message) end when '/status' if message_from_admin?(message, adm) || is_chat_authorized?(message, @auth_chat) - reply = `./srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}` + reply = `./scripts/srvstatus #{telnet['host']} #{telnet['port']} #{telnet['pass']}` else reply = "Refusal: I am not authorized to provide this information here." end diff --git a/srvstart b/scripts/srvstart similarity index 100% rename from srvstart rename to scripts/srvstart diff --git a/srvstart.expect b/scripts/srvstart.expect similarity index 100% rename from srvstart.expect rename to scripts/srvstart.expect diff --git a/srvstatus b/scripts/srvstatus similarity index 100% rename from srvstatus rename to scripts/srvstatus diff --git a/srvstatus.expect b/scripts/srvstatus.expect similarity index 100% rename from srvstatus.expect rename to scripts/srvstatus.expect diff --git a/srvstop b/scripts/srvstop similarity index 100% rename from srvstop rename to scripts/srvstop