Compress kick exit dumps into one line
This commit is contained in:
parent
a43bb7b819
commit
3475d464f8
2 changed files with 32 additions and 17 deletions
17
dataobjs.py
17
dataobjs.py
|
@ -249,15 +249,28 @@ class PesterProfile(object):
|
|||
initials = pcf+self.initials()
|
||||
return "<c=%s><c=%s>%s</c> %s %s %s.</c>" % \
|
||||
(syscolor.name(), self.colorhtml(), initials, timetext, verb, channel[1:].upper().replace("_", " "))
|
||||
def memobanmsg(self, opchum, opgrammar, syscolor, timeGrammar, reason):
|
||||
initials = timeGrammar.pcf+self.initials()+timeGrammar.number
|
||||
def memobanmsg(self, opchum, opgrammar, syscolor, initials, reason):
|
||||
opinit = opgrammar.pcf+opchum.initials()+opgrammar.number
|
||||
if type(initials) == type(list()):
|
||||
if opchum.handle == reason:
|
||||
return "<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo." % \
|
||||
(opchum.colorhtml(), opinit, self.colorhtml(), ", ".join(initials))
|
||||
else:
|
||||
return "<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo: <c=black>[%s]</c>." % \
|
||||
(opchum.colorhtml(), opinit, self.colorhtml(), ", ".join(initials), unicode(reason))
|
||||
else:
|
||||
initials = timeGrammar.pcf+self.initials()+timeGrammar.number
|
||||
if opchum.handle == reason:
|
||||
return "<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo." % \
|
||||
(opchum.colorhtml(), opinit, self.colorhtml(), initials)
|
||||
else:
|
||||
return "<c=%s>%s</c> banned <c=%s>%s</c> from responding to memo: <c=black>[%s]</c>." % \
|
||||
(opchum.colorhtml(), opinit, self.colorhtml(), initials, unicode(reason))
|
||||
def memopermabanmsg(self, opchum, opgrammar, syscolor, timeGrammar):
|
||||
initials = timeGrammar.pcf+self.initials()+timeGrammar.number
|
||||
opinit = opgrammar.pcf+opchum.initials()+opgrammar.number
|
||||
return "<c=%s>%s</c> permabanned <c=%s>%s</c> from the memo." % \
|
||||
(opchum.colorhtml(), opinit, self.colorhtml(), initials)
|
||||
def memojoinmsg(self, syscolor, td, timeGrammar, verb):
|
||||
(temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when)
|
||||
timetext = timeDifference(td)
|
||||
|
|
10
memos.py
10
memos.py
|
@ -987,8 +987,7 @@ class PesterMemo(PesterConvo):
|
|||
ttracker = self.times[h]
|
||||
else:
|
||||
ttracker = TimeTracker(timedelta(0))
|
||||
while ttracker.getTime() is not None:
|
||||
grammar = ttracker.getGrammar()
|
||||
allinitials = []
|
||||
opchum = PesterProfile(op)
|
||||
if self.times.has_key(op):
|
||||
opgrammar = self.times[op].getGrammar()
|
||||
|
@ -996,10 +995,13 @@ class PesterMemo(PesterConvo):
|
|||
opgrammar = self.time.getGrammar()
|
||||
else:
|
||||
opgrammar = TimeGrammar("CURRENT", "C", "RIGHT NOW")
|
||||
msg = chum.memobanmsg(opchum, opgrammar, systemColor, grammar, reason)
|
||||
while ttracker.getTime() is not None:
|
||||
grammar = ttracker.getGrammar()
|
||||
allinitials.append("%s%s%s" % (grammar.pcf, chum.initials(), grammar.number))
|
||||
ttracker.removeTime(ttracker.getTime())
|
||||
msg = chum.memobanmsg(opchum, opgrammar, systemColor, allinitials, reason)
|
||||
self.textArea.append(convertTags(msg))
|
||||
self.mainwindow.chatlog.log(self.channel, msg)
|
||||
ttracker.removeTime(ttracker.getTime())
|
||||
|
||||
if chum is self.mainwindow.profile():
|
||||
# are you next?
|
||||
|
|
Loading…
Reference in a new issue