From 8be8cf9f0785e09f24a4d9c0746131b8e76b40c3 Mon Sep 17 00:00:00 2001 From: Dpeta Date: Thu, 25 Mar 2021 21:39:37 +0100 Subject: [PATCH] WIP exit & traymenu fix --- irc.py | 3 +++ oyoyo/helpers.py | 1 + pesterchum.py | 18 +++++++++++++++--- version.py | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/irc.py b/irc.py index fcddfdb..2a50e09 100644 --- a/irc.py +++ b/irc.py @@ -313,6 +313,9 @@ class PesterIRC(QtCore.QThread): helpers.ctcp(self.cli, c, "NOQUIRKS", h) except socket.error: self.setConnectionBroken() + + def quit_dc(self): + helpers.quit(self.cli, _pcVersion + " <3") moodUpdated = QtCore.pyqtSignal('QString', Mood) colorUpdated = QtCore.pyqtSignal('QString', QtGui.QColor) diff --git a/oyoyo/helpers.py b/oyoyo/helpers.py index 5c25b59..62347d4 100644 --- a/oyoyo/helpers.py +++ b/oyoyo/helpers.py @@ -78,6 +78,7 @@ def identify(cli, passwd, authuser="NickServ"): msg(cli, authuser, "IDENTIFY %s" % passwd) def quit(cli, msg='gone'): + #print(msg) cli.send("QUIT :%s" % msg) cli._end = 1 diff --git a/pesterchum.py b/pesterchum.py index 1a33155..671d744 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -1137,7 +1137,7 @@ class PesterWindow(MovingWindow): opts.triggered.connect(self.openOpts) exitaction = QtWidgets.QAction(self.theme["main/menus/client/exit"], self) self.exitaction = exitaction - exitaction.triggered.connect(self.app.quit) + exitaction.triggered.connect(self.quit) userlistaction = QtWidgets.QAction(self.theme["main/menus/client/userlist"], self) self.userlistaction = userlistaction userlistaction.triggered.connect(self.showAllUsers) @@ -1322,7 +1322,7 @@ class PesterWindow(MovingWindow): # # Fuck you EVEN more OSX leopard! >:(((( # if not ostools.isOSXLeopard(): # checker = MSPAChecker(self) - + @QtCore.pyqtSlot(QString, QString) def updateMsg(self, ver, url): if not hasattr(self, 'updatemenu'): @@ -2928,6 +2928,17 @@ class PesterWindow(MovingWindow): msg.setInformativeText("The server has hit max capacity. Please try again later.") msg.show() + @QtCore.pyqtSlot() + def quit(self): + # girl help how do i scope + # This seriously needs to be fixed but I don't feel like it