Geolocation eingefeatured

This commit is contained in:
Simon Szustkowski 2012-10-11 17:10:43 +02:00
parent 5da920a77b
commit 0b9682b55d
1 changed files with 3 additions and 3 deletions

6
bot.rb
View File

@ -33,10 +33,10 @@ $current_status = res.body.to_s.strip
# If status differs from last time checked, put the announcement
if (last_status != $current_status)
if ($current_status == "offline")
tweet = "Der Raum ist jetzt OFFLINE."
tweet = "Der Raum ist jetzt OFFEN. #ctdo"
status = "offline"
elsif ($current_status == "online")
tweet = "Der Raum ist jetzt ONLINE."
tweet = "Der Raum ist jetzt GESCHLOSSEN. #ctdo."
status = "online"
else
tweet = "Raumstatus UNBEKANNT."
@ -44,5 +44,5 @@ if (last_status != $current_status)
end
$config['worker']['last_status'] = status
File.open(CONFIG_FILE, 'w') { |f| YAML.dump($config, f) }
client.update(tweet)
client.update(tweet, {:lat => "51.527611", :lon => "7.464944", :display_coordinates => "true"})
end