mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-30 23:41:07 -05:00
Weather: quick fix to locationsearch
This will be updated again in the future to return the place names like it used to.
This commit is contained in:
parent
0f5fdcfefd
commit
063f3e4800
@ -604,7 +604,7 @@ class Weather(callbacks.Plugin):
|
||||
helpful if Wunderground's autocomplete is not picking up the right place, as you can directly
|
||||
look up weather using any ZMW codes returned here.
|
||||
|
||||
Warning: ZMW codes are not fixed and are thus prone to sudden changes!
|
||||
Warning: ZMW codes are not fixed and are prone to sudden changes!
|
||||
"""
|
||||
apikey = self.registryValue('apiKey')
|
||||
if not apikey:
|
||||
@ -612,13 +612,10 @@ class Weather(callbacks.Plugin):
|
||||
Raise=True)
|
||||
|
||||
results = self._wuac(text)
|
||||
max_results = 10 # TODO: possibly make this configurable?
|
||||
cut_results = results[:max_results]
|
||||
# Output the list of results.
|
||||
if not results:
|
||||
irc.error("No results found.")
|
||||
else:
|
||||
irc.reply(format('%L', [': '.join(res) for res in cut_results]))
|
||||
irc.reply(format('%L', results))
|
||||
|
||||
Class = Weather
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user