mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Minor changes
This commit is contained in:
parent
24129e2867
commit
ce1435a55f
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user