diff --git a/TODO b/TODO index 1101ce2..3893393 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,7 @@ Features: -* changeColor -* protect against messages from yourself :P * Theme Changing * Handle user signoffs +* Handle nick changes * Logging * Moods * Add chum diff --git a/pesterchum.py b/pesterchum.py index 7a85c95..589287d 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -781,16 +781,16 @@ class PesterWindow(MovingWindow): self.chooseprofile = None @QtCore.pyqtSlot() def switchProfile(self): - closeWarning = QtGui.QMessageBox() - closeWarning.setText("WARNING: THIS WILL CLOSE ALL CONVERSATION WINDOWS!") - closeWarning.setInformativeText("i warned you bro") - closeWarning.setStandardButtons(QtGui.QMessageBox.Cancel | QtGui.QMessageBox.Ok) - closeWarning.setDefaultButton(QtGui.QMessageBox.Ok) - ret = closeWarning.exec_() - if ret == QtGui.QMessageBox.Cancel: - return - elif ret == QtGui.QMessageBox.Ok: - self.changeProfile() + if self.convos: + closeWarning = QtGui.QMessageBox() + closeWarning.setText("WARNING: THIS WILL CLOSE ALL CONVERSATION WINDOWS!") + closeWarning.setInformativeText("i warned you bro! i warned you about those windows") + closeWarning.setStandardButtons(QtGui.QMessageBox.Cancel | QtGui.QMessageBox.Ok) + closeWarning.setDefaultButton(QtGui.QMessageBox.Ok) + ret = closeWarning.exec_() + if ret == QtGui.QMessageBox.Cancel: + return + self.changeProfile() @QtCore.pyqtSlot(QtCore.QString) def nickCollision(self, handle): @@ -835,9 +835,10 @@ class PesterIRC(QtCore.QObject): helpers.msg(self.cli, h, "PESTERCHUM:CEASE") @QtCore.pyqtSlot() def updateProfile(self): - handle = self.mainwindow.profile.handle + me = self.mainwindow.profile + handle = me.handle helpers.nick(self.cli, handle) - + helpers.msg(self.cli, "#pesterchum", "MOOD >%d" % (me.mood.value())) def updateIRC(self): self.conn.next() @@ -870,6 +871,9 @@ class PesterHandler(DefaultCommandHandler): else: # private message + # silently ignore messages to yourself. + if handle == self.mainwindow.profile.handle: + return if msg[0:7] == "COLOR >": colors = msg[7:].split(",") try: diff --git a/profiles/spaceGhost.js b/profiles/spaceGhost.js new file mode 100644 index 0000000..2d79fe4 --- /dev/null +++ b/profiles/spaceGhost.js @@ -0,0 +1 @@ +{"color": "#ffff00", "theme": "pesterchum", "quirks": [], "handle": "spaceGhost"} \ No newline at end of file