Compress exit dumps into one line
This commit is contained in:
parent
efa8920d1c
commit
fd8c7881f8
4 changed files with 29 additions and 6 deletions
|
@ -53,6 +53,7 @@ CHANGELOG
|
||||||
* Volume control - Kiooeht [evacipatedBox]
|
* Volume control - Kiooeht [evacipatedBox]
|
||||||
* Set IRC away on idle - Kiooeht [evacipatedBox]
|
* Set IRC away on idle - Kiooeht [evacipatedBox]
|
||||||
* Remote quirk shutoff in memos - Kiooeht [evacipatedBox]
|
* Remote quirk shutoff in memos - Kiooeht [evacipatedBox]
|
||||||
|
* Compress exit dumps into one line - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
* Logviewer updates - Kiooeht [evacipatedBox]
|
* Logviewer updates - Kiooeht [evacipatedBox]
|
||||||
* Memo scrollbar thing - Kiooeht [evacipatedBox]
|
* Memo scrollbar thing - Kiooeht [evacipatedBox]
|
||||||
|
|
|
@ -15,8 +15,8 @@ Features
|
||||||
* Chum notes?
|
* Chum notes?
|
||||||
* whowas for last seen online?
|
* whowas for last seen online?
|
||||||
* Tab completion of two letter names
|
* Tab completion of two letter names
|
||||||
* Compress exit dumps into one line (eg. FTC, CTC, PTC1-12 ceased responding to memo)
|
|
||||||
* Customizable name alerts
|
* Customizable name alerts
|
||||||
|
* When 'banned' make impossible to connect using timestamp banned under
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
|
|
20
dataobjs.py
20
dataobjs.py
|
@ -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"])
|
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):
|
def idlemsg(self, syscolor, verb):
|
||||||
return "<c=%s>-- %s <c=%s>[%s]</c> %s --</c>" % (syscolor.name(), self.handle, self.colorhtml(), self.initials(), 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):
|
def memoclosemsg(self, syscolor, initials, verb):
|
||||||
return "<c=%s><c=%s>%s%s%s</c> %s.</c>" % (syscolor.name(), self.colorhtml(), timeGrammar.pcf, self.initials(), timeGrammar.number, 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):
|
def memoopenmsg(self, syscolor, td, timeGrammar, verb, channel):
|
||||||
(temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when)
|
(temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when)
|
||||||
timetext = timeDifference(td)
|
timetext = timeDifference(td)
|
||||||
|
|
10
memos.py
10
memos.py
|
@ -791,13 +791,19 @@ class PesterMemo(PesterConvo):
|
||||||
self.userlist.takeItem(self.userlist.row(c))
|
self.userlist.takeItem(self.userlist.row(c))
|
||||||
if not self.times.has_key(h):
|
if not self.times.has_key(h):
|
||||||
self.times[h] = TimeTracker(timedelta(0))
|
self.times[h] = TimeTracker(timedelta(0))
|
||||||
|
allinitials = {}
|
||||||
while self.times[h].getTime() is not None:
|
while self.times[h].getTime() is not None:
|
||||||
t = self.times[h]
|
t = self.times[h]
|
||||||
grammar = t.getGrammar()
|
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.textArea.append(convertTags(msg))
|
||||||
self.mainwindow.chatlog.log(self.channel, msg)
|
self.mainwindow.chatlog.log(self.channel, msg)
|
||||||
self.times[h].removeTime(t.getTime())
|
|
||||||
if update == "nick":
|
if update == "nick":
|
||||||
self.addUser(newnick)
|
self.addUser(newnick)
|
||||||
newchums = self.userlist.findItems(newnick, QtCore.Qt.MatchFlags(0))
|
newchums = self.userlist.findItems(newnick, QtCore.Qt.MatchFlags(0))
|
||||||
|
|
Loading…
Reference in a new issue