mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 10:34:19 +01:00
Some bugfixes.
This commit is contained in:
parent
71a5c94163
commit
597819a971
@ -41,6 +41,8 @@ __contributors__ = {}
|
|||||||
|
|
||||||
import supybot.plugins as plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
@ -92,7 +94,7 @@ class Time(callbacks.Privmsg):
|
|||||||
seconds += i
|
seconds += i
|
||||||
irc.reply(str(seconds))
|
irc.reply(str(seconds))
|
||||||
|
|
||||||
def at(self, irc, msg, args):
|
def _at(self, irc, msg, args):
|
||||||
"""<time string>
|
"""<time string>
|
||||||
|
|
||||||
Returns the number of seconds since epoch <time string> is.
|
Returns the number of seconds since epoch <time string> is.
|
||||||
@ -101,7 +103,7 @@ class Time(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
s = privmsgs.getArgs(args)
|
s = privmsgs.getArgs(args)
|
||||||
|
|
||||||
def until(self, irc, msg, args):
|
def _until(self, irc, msg, args):
|
||||||
"""<time string>
|
"""<time string>
|
||||||
|
|
||||||
Returns the number of seconds until <time string>.
|
Returns the number of seconds until <time string>.
|
||||||
@ -114,7 +116,7 @@ class Time(callbacks.Privmsg):
|
|||||||
Returns the ctime for <seconds since epoch>, or the current ctime if
|
Returns the ctime for <seconds since epoch>, or the current ctime if
|
||||||
no <seconds since epoch> is given.
|
no <seconds since epoch> is given.
|
||||||
"""
|
"""
|
||||||
seconds = privmsgs.getArgs(args)
|
seconds = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
if seconds:
|
if seconds:
|
||||||
try:
|
try:
|
||||||
seconds = float(seconds)
|
seconds = float(seconds)
|
||||||
|
Loading…
Reference in New Issue
Block a user