mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Yeah, shouldn't have committed this without testing first.
This commit is contained in:
parent
fdc8cdb15c
commit
4be774363a
@ -39,6 +39,7 @@ __revision__ = "$Id$"
|
|||||||
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import csv
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
import itertools
|
import itertools
|
||||||
@ -101,7 +102,7 @@ class FlatfileDunnoDB(DunnoDBInterface):
|
|||||||
return csv.join(map(str, record))
|
return csv.join(map(str, record))
|
||||||
|
|
||||||
def deserialize(self, s):
|
def deserialize(self, s):
|
||||||
L = csv.split(None, 2)
|
L = csv.split(s)
|
||||||
L[0] = float(L[0])
|
L[0] = float(L[0])
|
||||||
L[1] = int(L[1])
|
L[1] = int(L[1])
|
||||||
return L
|
return L
|
||||||
@ -262,8 +263,12 @@ class Dunno(callbacks.Privmsg):
|
|||||||
irc.error('%r is not a valid dunno id.' % id)
|
irc.error('%r is not a valid dunno id.' % id)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
name = ircdb.users.getUser(id).name
|
||||||
(dunno, by, at) = self.db.get(channel, id)
|
(dunno, by, at) = self.db.get(channel, id)
|
||||||
irc.reply("Dunno #%s: %r" % (id, dunno))
|
at = time.localtime(at)
|
||||||
|
timeStr = time.strftime(conf.supybot.humanTimestampFormat(), at)
|
||||||
|
irc.reply("Dunno #%s: %r (added by %s at %s)" % \
|
||||||
|
(id, dunno, name, timeStr))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error('No dunno found with that id.')
|
irc.error('No dunno found with that id.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user