print"Environment is grinning and holding a spatula. Please review your configuration.\n\n".red.bold
else
print"Environment appears sane.\n\n".green.bold
end
if@probes.nil?
if@probes.nil?
errcount+=1
errcount+=1
print"FAIL!\n\n".red.bold
print"FAIL!\n\n".red.bold
@ -112,6 +107,12 @@ if @probes.nil?
else
else
print"OK\n".green.bold
print"OK\n".green.bold
end
end
puts"Errors found: #{errcount.to_s}\n\n"
iferrcount>0
print"Environment is grinning and holding a spatula. Please review your configuration.\n\n".red.bold
else
print"Environment appears sane.\n\n".green.bold
end
STDOUT.sync=false
STDOUT.sync=false
### End sanity check ###
### End sanity check ###
@ -158,6 +159,17 @@ def handle_message(message)
#Format command
#Format command
command=message.text.split("")[0].split("@")[0].downcase#Strip command from arguments and @tags
command=message.text.split("")[0].split("@")[0].downcase#Strip command from arguments and @tags
## Constant collection model (may be scrapped)
#last_collection = 0
#loop do
# collection_time = Time.now
# if collection_time - last_collection >= 10
# puts timestamp + ": [#{collection_time}] Updating records //Not really"
# last_collection = collection_time
# STDOUT.flush
# end
#end
reply='Empty String'
reply='Empty String'
adm=@conf['admin']
adm=@conf['admin']
putsTime.now.strftime("%F %H:%M:%S").yellow+": Received command from "+"#{message.from.username}".cyan.bold+" ["+"#{message.from.id}".cyan+"]: "+"#{command}".magenta.bold
putsTime.now.strftime("%F %H:%M:%S").yellow+": Received command from "+"#{message.from.username}".cyan.bold+" ["+"#{message.from.id}".cyan+"]: "+"#{command}".magenta.bold