diff --git a/plugins/Fun.py b/plugins/Fun.py index cef47ada9..2cbd4efe9 100644 --- a/plugins/Fun.py +++ b/plugins/Fun.py @@ -300,7 +300,7 @@ class Fun(callbacks.Privmsg): length, use 0. """ irc.reply(utils.soundex(text, length)) - soundex = wrap(soundex, ['text', optional('int', 4)]) + soundex = wrap(soundex, ['text', additional('int', 4)]) # The list of words and algorithm are pulled straight the mozbot # MagicEightBall.bm module: http://tinyurl.com/7ytg7 @@ -339,7 +339,7 @@ class Fun(callbacks.Privmsg): irc.reply(self._checkTheBall(len(text))) else: irc.reply(self._checkTheBall(random.randint(0, 2))) - eightball = wrap(eightball, [optional('text')]) + eightball = wrap(eightball, [additional('text')]) _rouletteChamber = random.randrange(0, 6) _rouletteBullet = random.randrange(0, 6) @@ -367,7 +367,7 @@ class Fun(callbacks.Privmsg): irc.reply('*click*') self._rouletteChamber += 1 self._rouletteChamber %= 6 - roulette = wrap(roulette, ['public', optional(('literal', 'spin'))]) + roulette = wrap(roulette, ['public', additional(('literal', 'spin'))]) def monologue(self, irc, msg, args, channel): """[] diff --git a/plugins/Time.py b/plugins/Time.py index e9562507b..757b07eb9 100644 --- a/plugins/Time.py +++ b/plugins/Time.py @@ -147,21 +147,15 @@ class Time(callbacks.Privmsg): else: irc.error('That\'s right now!') - def ctime(self, irc, msg, args): + def ctime(self, irc, msg, args, seconds): """[] Returns the ctime for , or the current ctime if no is given. """ - seconds = privmsgs.getArgs(args, required=0, optional=1) - if seconds: - try: - seconds = float(seconds) - except ValueError: - irc.errorInvalid('seconds', seconds, Raise=True) - else: - seconds = time.time() irc.reply(time.ctime(seconds)) + ctime = wrap(ctime, [additional(('int', 'number of seconds since epoch'), + TIME.time)]) def time(self, irc, msg, args, channel, format, seconds): """[] []