Display message in chat when your quirk gets disabled
This commit is contained in:
parent
94a8b2cd69
commit
cca3f83984
2 changed files with 16 additions and 1 deletions
|
@ -280,6 +280,10 @@ class PesterProfile(object):
|
||||||
else: modeon = "no longer"
|
else: modeon = "no longer"
|
||||||
return "<c=%s>Memo is %s <c=black>%s</c> by <c=%s>%s</c></c>" % \
|
return "<c=%s>Memo is %s <c=black>%s</c> by <c=%s>%s</c></c>" % \
|
||||||
(syscolor.name(), modeon, modeverb, opchum.colorhtml(), opinit)
|
(syscolor.name(), modeon, modeverb, opchum.colorhtml(), opinit)
|
||||||
|
def memoquirkkillmsg(self, opchum, opgrammar, syscolor):
|
||||||
|
opinit = opgrammar.pcf+opchum.initials()+opgrammar.number
|
||||||
|
return "<c=%s><c=%s>%s</c> turned off you quirk.</c>" % \
|
||||||
|
(syscolor.name(), opchum.colorhtml(), opinit)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def checkLength(handle):
|
def checkLength(handle):
|
||||||
|
|
13
memos.py
13
memos.py
|
@ -819,7 +819,18 @@ class PesterMemo(PesterConvo):
|
||||||
if msg == self.mainwindow.profile().handle:
|
if msg == self.mainwindow.profile().handle:
|
||||||
self.quirksOff.setChecked(True)
|
self.quirksOff.setChecked(True)
|
||||||
self.applyquirks = False
|
self.applyquirks = False
|
||||||
# TODO: Politely notify the client
|
systemColor = QtGui.QColor(self.mainwindow.theme["memos/systemMsgColor"])
|
||||||
|
chum = self.mainwindow.profile()
|
||||||
|
opchum = PesterProfile(op)
|
||||||
|
if self.times.has_key(op):
|
||||||
|
opgrammar = self.times[op].getGrammar()
|
||||||
|
elif op == self.mainwindow.profile().handle:
|
||||||
|
opgrammar = self.time.getGrammar()
|
||||||
|
else:
|
||||||
|
opgrammar = TimeGrammar("CURRENT", "C", "RIGHT NOW")
|
||||||
|
msg = chum.memoquirkkillmsg(opchum, opgrammar, systemColor)
|
||||||
|
self.textArea.append(convertTags(msg))
|
||||||
|
self.mainwindow.chatlog.log(self.channel, msg)
|
||||||
|
|
||||||
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString, QtCore.QString)
|
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString, QtCore.QString)
|
||||||
def userPresentChange(self, handle, channel, update):
|
def userPresentChange(self, handle, channel, update):
|
||||||
|
|
Loading…
Reference in a new issue