mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Make Weather.weather less complicated and fix the bug where it wouldn't be listed as a command until it had been called once.
This commit is contained in:
parent
ad35c62568
commit
9f6e826481
@ -57,9 +57,6 @@ class WeatherCommand(registry.String):
|
||||
if s not in m:
|
||||
raise registry.InvalidRegistryValue,\
|
||||
format('Command must be one of %L', m)
|
||||
else:
|
||||
method = getattr(plugin.Weather, s)
|
||||
plugin.Weather.weather.im_func.__doc__ = method.__doc__
|
||||
registry.String.setValue(self, s)
|
||||
|
||||
Weather = conf.registerPlugin('Weather')
|
||||
|
@ -62,7 +62,10 @@ class Weather(callbacks.Plugin):
|
||||
raise NoLocation, noLocationError
|
||||
|
||||
def weather(self, irc, msg, args, location):
|
||||
# This specifically does not have a docstring.
|
||||
"""<US zip code | US/Canada city, state | Foreign city, country>
|
||||
|
||||
Returns the approximate weather conditions for a given city.
|
||||
"""
|
||||
channel = None
|
||||
if irc.isChannel(msg.args[0]):
|
||||
channel = msg.args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user