another big commit :D

This commit is contained in:
jomo
2013-10-07 04:59:21 +02:00
parent 2761387703
commit 5fac505a31
74 changed files with 1003 additions and 357 deletions

View File

@@ -0,0 +1,21 @@
class StatusController < ApplicationController
def show
if params[:check]
if params[:check].downcase == "minecraft"
if port_open?("redstoner.com", 25565)
send_file "app/assets/images/on.png", :type => "image/png", :disposition => "inline"
else
send_file "app/assets/images/off.png", :type => "image/png", :disposition => "inline"
end
elsif params[:check].downcase == "teamspeak"
if port_open?("redstoner.com", 9987)
send_file "app/assets/images/on.png", :type => "image/png", :disposition => "inline"
else
send_file "app/assets/images/off.png", :type => "image/png", :disposition => "inline"
end
else
render :text => "invalid params"
end
end
end
end