From 1e028cc82394a43ff02f1f854cce4c38efbb8400 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Sun, 26 Jul 2015 22:00:55 +0200 Subject: [PATCH] fix for weather.lua --- plugins/weather.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/weather.lua b/plugins/weather.lua index ce7ef8a..b7c7e6e 100644 --- a/plugins/weather.lua +++ b/plugins/weather.lua @@ -4,6 +4,7 @@ local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finde Wetter in ", location) + local location = string.gsub(location," ","+") local url = BASE_URL url = url..'?q='..location url = url..'&lang=de&units=metric' @@ -14,9 +15,7 @@ local function get_weather(location) local weather = json:decode(b) local city = weather.name local country = weather.sys.country - local temp = 'Die Temperatur in '..city - ..' (' ..country..')' - ..' beträgt '..weather.main.temp..'°C' + local temp = 'Die Temperatur in '..city..' (' ..country..')'..' beträgt '..weather.main.temp..'°C' local conditions = 'Die aktuelle Wetterlage ist: ' .. weather.weather[1].description