pesterchum/mash
Stephen Dranger a58dbe2943 0.0.10
2011-02-06 18:50:21 -06:00

110 lines
6.6 KiB
Text

diff --git a/memos.py b/memos.py
index 239947e..af7ab32 100644
--- a/memos.py
+++ b/memos.py
@@ -236,7 +236,9 @@ class MemoText(PesterText):
time = TimeTracker(newtime)
parent.times[chum.handle] = time
timeGrammar = time.getGrammar()
- self.append(convertTags(chum.memojoinmsg(systemColor, time.getTime(), timeGrammar, window.theme["convo/text/joinmemo"])))
+ msg = chum.memojoinmsg(systemColor, time.getTime(), timeGrammar, window.theme["convo/text/joinmemo"])
+ self.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
else:
time = parent.time
@@ -356,7 +358,9 @@ class PesterMemo(PesterConvo):
p = self.mainwindow.profile()
timeGrammar = self.time.getGrammar()
systemColor = QtGui.QColor(self.mainwindow.theme["memos/systemMsgColor"])
- self.textArea.append(convertTags(p.memoopenmsg(systemColor, self.time.getTime(), timeGrammar, self.mainwindow.theme["convo/text/openmemo"], self.channel)))
+ msg = p.memoopenmsg(systemColor, self.time.getTime(), timeGrammar, self.mainwindow.theme["convo/text/openmemo"], self.channel)
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
self.op = False
self.newmessage = False
@@ -482,18 +486,24 @@ class PesterMemo(PesterConvo):
self.times[handle].setCurrent(close)
grammar = self.times[handle].getGrammar()
self.times[handle].removeTime(close)
- self.textArea.append(convertTags(chum.memoclosemsg(systemColor, grammar, window.theme["convo/text/closememo"])))
+ msg = chum.memoclosemsg(systemColor, grammar, window.theme["convo/text/closememo"])
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
elif timed not in self.times[handle]:
self.times[handle].addTime(timed)
grammar = self.times[handle].getGrammar()
- self.textArea.append(convertTags(chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"])))
+ msg = chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"])
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
else:
self.times[handle].setCurrent(timed)
else:
if timed is not None:
ttracker = TimeTracker(timed)
grammar = ttracker.getGrammar()
- self.textArea.append(convertTags(chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"])))
+ msg = chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"])
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
self.times[handle] = ttracker
@QtCore.pyqtSlot()
@@ -556,7 +566,9 @@ class PesterMemo(PesterConvo):
while self.times[h].getTime() is not None:
t = self.times[h]
grammar = t.getGrammar()
- self.textArea.append(convertTags(chum.memoclosemsg(systemColor, grammar, self.mainwindow.theme["convo/text/closememo"])))
+ msg = chum.memoclosemsg(systemColor, grammar, self.mainwindow.theme["convo/text/closememo"])
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
self.times[h].removeTime(t.getTime())
if update == "nick":
self.addUser(newnick)
@@ -583,7 +595,9 @@ class PesterMemo(PesterConvo):
opgrammar = self.time.getGrammar()
else:
opgrammar = TimeGrammar("CURRENT", "C", "RIGHT NOW")
- self.textArea.append(convertTags(chum.memobanmsg(opchum, opgrammar, systemColor, grammar)))
+ msg = chum.memobanmsg(opchum, opgrammar, systemColor, grammar)
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
ttracker.removeTime(ttracker.getTime())
if chum is self.mainwindow.profile():
@@ -599,7 +613,9 @@ class PesterMemo(PesterConvo):
self.resetSlider(curtime)
self.mainwindow.joinChannel.emit(self.channel)
me = self.mainwindow.profile()
- self.textArea.append(convertTags(me.memoopenmsg(systemColor, self.time.getTime(), self.time.getGrammar(), self.mainwindow.theme["convo/text/openmemo"], self.channel)))
+ msg = me.memoopenmsg(systemColor, self.time.getTime(), self.time.getGrammar(), self.mainwindow.theme["convo/text/openmemo"], self.channel)
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
elif ret == QtGui.QMessageBox.Cancel:
if self.parent():
i = self.parent().tabIndices[self.channel]
@@ -639,7 +655,9 @@ class PesterMemo(PesterConvo):
time = txt2delta(self.timeinput.text())
present = self.time.addTime(time)
if not present:
- self.textArea.append(convertTags(me.memojoinmsg(systemColor, time, self.time.getGrammar(), self.mainwindow.theme["convo/text/joinmemo"])))
+ msg = me.memojoinmsg(systemColor, time, self.time.getGrammar(), self.mainwindow.theme["convo/text/joinmemo"])
+ self.textArea.append(convertTags(msg))
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
serverText = "PESTERCHUM:TIME>"+delta2txt(time, "server")
self.messageSent.emit(serverText, self.title())
@@ -651,7 +669,9 @@ class PesterMemo(PesterConvo):
if removed:
grammar = self.time.getGrammarTime(time)
systemColor = QtGui.QColor(self.mainwindow.theme["memos/systemMsgColor"])
- self.textArea.append(convertTags(me.memoclosemsg(systemColor, grammar, self.mainwindow.theme["convo/text/closememo"])))
+
+ self.textArea.append(convertTags(
+ window.chatlog.log(parent.channel, convertTags(msg, "bbcode"))
newtime = self.time.getTime()
if newtime is None: