|
|
|
@ -125,8 +125,18 @@ 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']
|
|
|
|
|
print 'Checking connectivity to Empyrion service... '
|
|
|
|
|
STDOUT.flush
|
|
|
|
|
if system("nc -zvw3 #{telnet['host']} #{telnet['port']} >/dev/null 2>&1")
|
|
|
|
|
print "OK\n".green.bold + "Sending shutdown message:\n"
|
|
|
|
|
STDOUT.flush
|
|
|
|
|
reply = "Affirmation: I am shutting down the Empyrion service."
|
|
|
|
|
`./scripts/srvstop #{telnet['host']} #{telnet['port']} #{telnet['pass']}`
|
|
|
|
|
return "Affirmation: I am shutting down the Empyrion service."
|
|
|
|
|
else
|
|
|
|
|
print "Server did not respond!\nSending failure message...\n".red.bold
|
|
|
|
|
reply = "Exclamation: Server is not responding!"
|
|
|
|
|
end
|
|
|
|
|
return reply
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|