Commit e19f0b1f authored by Cool Fire's avatar Cool Fire

Use txt instead of json, since the json object does not seem to be updated anymore

parent afdfb285
Pipeline #612 passed with stages
in 3 minutes and 24 seconds
......@@ -12,7 +12,7 @@ class Internetonfire
@irc = irc
@timer = timer
@url = 'https://istheinternetonfire.com/status.json'
@url = 'https://istheinternetonfire.com/status.txt'
@timer = 3600
@recent = ''
......@@ -40,9 +40,7 @@ class Internetonfire
def check_state
loop do
begin
response = open(@url).read
state = JSON.parse(response)['status']
state = open(@url).read
# Check if changed since last time
if @recent == state
......@@ -50,7 +48,7 @@ class Internetonfire
else
@recent = state
# Set topic
@irc.topic( @channel, "#{@prefix} | Is the internet on fire? #{state}" )
@irc.topic( @channel, "#{@prefix} | #{state}" )
end
rescue Exception => e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment