Minor changes

This commit is contained in:
Jeremy Fincher 2003-04-08 09:11:33 +00:00
parent 24129e2867
commit ce1435a55f

View File

@ -49,6 +49,7 @@ import sqlite
import conf import conf
import debug import debug
import utils
import ircdb import ircdb
import ircmsgs import ircmsgs
import privmsgs import privmsgs
@ -173,8 +174,8 @@ class Notes(callbacks.Privmsg):
author = self.getUserName(from_id) author = self.getUserName(from_id)
public = int(public) public = int(public)
added_at = int(added_at) added_at = int(added_at)
senttime = time.strftime(conf.timestampFormat) elapsed = utils.timeElapsed(time.time() - added_at)
newnote = "%s (Sent by %s on %s)" % (note, author, senttime) newnote = "%s (Sent by %s %s ago)" % (note, author, elapsed)
if senderID == to_id: if senderID == to_id:
if public: if public:
irc.reply(msg, newnote) irc.reply(msg, newnote)
@ -189,7 +190,8 @@ class Notes(callbacks.Privmsg):
def notes(self, irc, msg, args): def notes(self, irc, msg, args):
"""<takes no arguments> """<takes no arguments>
Retrieves all unread notes for the requesting user.""" Retrieves all unread notes for the requesting user.
"""
try: try:
sender = ircdb.users.getUserName(msg.prefix) sender = ircdb.users.getUserName(msg.prefix)
except KeyError: except KeyError: