Compress exit dumps into one line

This commit is contained in:
Kiooeht 2011-07-02 14:10:59 -07:00
parent efa8920d1c
commit fd8c7881f8
4 changed files with 29 additions and 6 deletions

View file

@ -53,6 +53,7 @@ CHANGELOG
* Volume control - Kiooeht [evacipatedBox]
* Set IRC away on idle - Kiooeht [evacipatedBox]
* Remote quirk shutoff in memos - Kiooeht [evacipatedBox]
* Compress exit dumps into one line - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
* Bug fixes
* Logviewer updates - Kiooeht [evacipatedBox]
* Memo scrollbar thing - Kiooeht [evacipatedBox]

View file

@ -15,8 +15,8 @@ Features
* Chum notes?
* whowas for last seen online?
* Tab completion of two letter names
* Compress exit dumps into one line (eg. FTC, CTC, PTC1-12 ceased responding to memo)
* Customizable name alerts
* When 'banned' make impossible to connect using timestamp banned under
Bugs
----

View file

@ -231,8 +231,24 @@ class PesterProfile(object):
return "<c=%s>-- %s <c=%s>[%s]</c> changed their mood to %s <img src='%s' /> --</c>" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), mood.name().upper(), theme["main/chums/moods"][mood.name()]["icon"])
def idlemsg(self, syscolor, verb):
return "<c=%s>-- %s <c=%s>[%s]</c> %s --</c>" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), verb)
def memoclosemsg(self, syscolor, timeGrammar, verb):
return "<c=%s><c=%s>%s%s%s</c> %s.</c>" % (syscolor.name(), self.colorhtml(), timeGrammar.pcf, self.initials(), timeGrammar.number, verb)
def memoclosemsg(self, syscolor, initials, verb):
msg = "<c=%s><c=%s>" % (syscolor.name(), self.colorhtml())
for i,n in initials.iteritems():
msg += i
if len(n) == 1:
if n[0] != 0:
msg += str(n[0])
elif len(n) > 1:
n.sort()
msg += str(n[0])
last = n[0]
pos = 1
while n[pos] == last+1:
last += 1
msg += "%s-%s" % (min(n), max(n))
msg += ", "
return msg[:-2] + "</c> %s.</c>" % (verb)
def memoopenmsg(self, syscolor, td, timeGrammar, verb, channel):
(temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when)
timetext = timeDifference(td)

View file

@ -791,13 +791,19 @@ class PesterMemo(PesterConvo):
self.userlist.takeItem(self.userlist.row(c))
if not self.times.has_key(h):
self.times[h] = TimeTracker(timedelta(0))
allinitials = {}
while self.times[h].getTime() is not None:
t = self.times[h]
grammar = t.getGrammar()
msg = chum.memoclosemsg(systemColor, grammar, self.mainwindow.theme["convo/text/closememo"])
#allinitials.append("%s%s%s" % (grammar.pcf, chum.initials(), grammar.number))
if "%s%s" % (grammar.pcf, chum.initials()) in allinitials:
allinitials["%s%s" % (grammar.pcf, chum.initials())].append(int(grammar.number) if grammar.number.isdigit() else 0)
else:
allinitials["%s%s" % (grammar.pcf, chum.initials())] = [int(grammar.number) if grammar.number.isdigit() else 0]
self.times[h].removeTime(t.getTime())
msg = chum.memoclosemsg(systemColor, allinitials, self.mainwindow.theme["convo/text/closememo"])
self.textArea.append(convertTags(msg))
self.mainwindow.chatlog.log(self.channel, msg)
self.times[h].removeTime(t.getTime())
if update == "nick":
self.addUser(newnick)
newchums = self.userlist.findItems(newnick, QtCore.Qt.MatchFlags(0))