diff options
author | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-03-10 19:58:28 +0000 |
---|---|---|
committer | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-03-10 19:58:28 +0000 |
commit | fb2cd452e963b8bc048161036903cd82d3b113f0 (patch) | |
tree | 81182d25fc19f538292b52a9e7c697447d5e6548 /modules/clock.py | |
parent | 5cad6661c9437832e23469aba2c9f04d94b734ee (diff) | |
download | bot-fb2cd452e963b8bc048161036903cd82d3b113f0.tar.gz bot-fb2cd452e963b8bc048161036903cd82d3b113f0.tar.bz2 bot-fb2cd452e963b8bc048161036903cd82d3b113f0.zip |
Some documentation and minor fixes.
Diffstat (limited to 'modules/clock.py')
-rwxr-xr-x | modules/clock.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/clock.py b/modules/clock.py index 9e38d7b..2ef6b21 100755 --- a/modules/clock.py +++ b/modules/clock.py @@ -186,7 +186,7 @@ TimeZones.update(TZ1) @deprecated def f_time(self, origin, match, args): - """.t [ <timezone> ] - Returns the current time""" + """Returns the current time.""" tz = match.group(2) or 'GMT' # Personal time zones, because they're rad @@ -231,8 +231,11 @@ def f_time(self, origin, match, args): msg = time.strftime("%a, %d %b %Y %H:%M:%S " + str(tz), timenow) self.msg(origin.sender, msg) f_time.commands = ['t'] +f_time.name = 't' +f_time.example = '.t UTC' def beats(phenny, input): + """Shows the internet time in Swatch beats.""" beats = ((time.time() + 3600) % 86400) / 86.4 beats = int(math.floor(beats)) phenny.say('@%03i' % beats) @@ -243,6 +246,7 @@ def divide(input, by): return (input / by), (input % by) def yi(phenny, input): + """Shows whether it is currently yi or not.""" quadraels, remainder = divide(int(time.time()), 1753200) raels = quadraels * 4 extraraels, remainder = divide(remainder, 432000) @@ -255,6 +259,7 @@ yi.priority = 'low' # d8uv d8uv d8uv d8uv d8uv d8uv d8uv def tock(phenny, input): + """Shows the time from the USNO's atomic clock.""" u = urllib.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl') info = u.info() u.close() |