From db64c53bfb3f51af3d6206427bc4e975c42e6df7 Mon Sep 17 00:00:00 2001 From: Stephen Dranger Date: Mon, 14 Feb 2011 15:15:32 -0600 Subject: [PATCH] bluh --- TODO | 1 + irc.py | 5 +++++ irc.pyc | Bin 13758 -> 14100 bytes oyoyo/client.py | 3 ++- oyoyo/client.pyc | Bin 9751 -> 9913 bytes parsetools.pyc | Bin 10945 -> 11107 bytes pesterchum.js | 2 +- pesterchum.py | 18 +++++++++++++++--- themes/pesterchum/style.js | 1 + 9 files changed, 25 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index be2733d..dd573ce 100644 --- a/TODO +++ b/TODO @@ -3,6 +3,7 @@ Bugs: * X and _ buttons move around all crazy like Features: +* Manual reconnect * help menu -- about and forum * copy quirks between profiles? * shared buddy lists - changes to the buddy list should refresh it? diff --git a/irc.py b/irc.py index 2d6d6a7..f3e87b5 100644 --- a/irc.py +++ b/irc.py @@ -24,6 +24,8 @@ class PesterIRC(QtCore.QObject): self.cli.command_handler.mainwindow = self.mainwindow self.conn = self.cli.connect() self.brokenConnection = False + def closeConnection(self): + self.cli.close() def setConnectionBroken(self): self.brokenConnection = True @QtCore.pyqtSlot(PesterProfile) @@ -155,6 +157,9 @@ class PesterIRC(QtCore.QObject): helpers.mode(self.cli, c, m, cmd) except socket.error: self.setConnectionBroken() + @QtCore.pyqtSlot() + def reconnectIRC(self): + self.setConnectionBroken() def updateIRC(self): self.conn.next() diff --git a/irc.pyc b/irc.pyc index 15a252586b18fc09a32c7f7e180a8aae79f2f326..5a9a87705cdafccdf92460e4b9fa5b7df9ee51f8 100644 GIT binary patch delta 3041 zcmbVOZETZO6ux&`+jVXC-R`3uV_VmDpKNTT3EN6EsBcIWKQNHYA2WPtJYLx#ynG zx4k+2T2%kt@0Ox{3zzj*IR61|aAz`<&rUGr*D+bo!UiT6vU$!z1xO0PZ`AlA;&mEt z(s*&pOtP8H=dqApGqB_u6qDAVX-hP1lJ4V^g_^GPzHXkekWnMcvdAKhEY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waUTEO*1-BWMbiU6$^hsxb+etXi091fifb^LNszFVgQ7%zKSC={4)NUH>I>?LY&90Q= z5r!Qr~KsL5sk-EA@QyH`X0ah%Wt8|-p=78@IMMj z1D*st1;Cao!+-+-`C_pMnMd;yq?Z9#0O(4Y2e|32OcfDz|yqI%P_0Z8x IAMp8q0q?&BNB{r; diff --git a/oyoyo/client.py b/oyoyo/client.py index b2d5975..6c5fff2 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -185,7 +185,8 @@ class IRCClient: if self.socket: logging.info('closing socket') self.socket.close() - + def close(self): + self.socket.close() class IRCApp: """ This class manages several IRCClient instances without the use of threads. diff --git a/oyoyo/client.pyc b/oyoyo/client.pyc index 88704aa23617a472fee53a378f4a6ea00a1ca99e..d3a6ea9192bc596edad5ee9aeb44e1be78aff23b 100644 GIT binary patch delta 219 zcmbR4v(uOD;wN6N$XOfNDwr9KCf74-@usjav@kG4u`vV%Yp`x!%N#1~oXp6;zyQO} zKz6Ypkf>o`$OIxrhGw8-3Ijv121tpY1{07B;s+59Kmsfn#6Fpy*+CG*-vh+OASDcp z8tju<#5I_L9460Ib(x$i&c(+C6lP;)W8yU8RN%DQ+$_$<#CUXamt+Rxk;$JWA26QU ud_}5*iSfebSXmh+#@m~#pF diff --git a/parsetools.pyc b/parsetools.pyc index 68bb11c4e952b57a660d9e0762fc3f9dd18d734d..97122b334305d9163a965ca50f47fcf650b286ac 100644 GIT binary patch delta 270 zcmX>Y`Z!Gb;wN4%^Ug@$WCkeU0MZUXTzqn)^lU~(waMEV8^qihQal*UQal+_ynvK9 zLy8ZGn(WIIsh*O?kdhAMWiX^<0;w#9lx!fC!;q58U=}6MkjlW2$-$74H+dtIG-Lke zvrLsr_PjvjlM_oaQWJ}cOZ3t+(~7x)B35uAt74Ffq@2X$>=K|FunLf~tjhCK(@JwD zyQq3daRK?oIhnbsNYW7g<}OufCV4)fd_i)2Qfh8#acTh)fX@^HcfWX Ns-E1h#lghI1ONgNN`wFa delta 115 zcmaDHb}&@>;wN4%wc1GEWCkeU0MZUXT)cLp^lU~(rODeF8^l~0QrsELQal(^Jb{!K zLy9+$@|o<*6v-VW&ydQ%kjcT2k~aA)lQd)c=9f&BN|P6>x@~4vlVsX#uQ88_v1;-? Jt!gGNCIF+{9xVU> diff --git a/pesterchum.js b/pesterchum.js index 57d8f08..aaa058c 100644 --- a/pesterchum.js +++ b/pesterchum.js @@ -1 +1 @@ -{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "confusedTransient", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense", "obliviousCrafter"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file +{"tabs": true, "soundon": true, "server": "irc.tymoon.eu", "chums": ["unknownTraveler", "tentacleTherapist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen", "anguillaNuntia", "oilslickOrchid", "confusedTransient", "pretentiousFantasia", "aquaticMarinist", "lyricalKeraunoscopic", "counterRealist", "ectoBiologist", "percipientPedestrian", "asceticClinician", "doctectiveMiracles", "noSense", "obliviousCrafter", "ircMonster"], "defaultprofile": "ghostDunk", "block": []} \ No newline at end of file diff --git a/pesterchum.py b/pesterchum.py index a3aaf09..8572a33 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -60,7 +60,7 @@ class PesterLog(object): self.convos = {} def log(self, handle, msg): bbcodemsg = convertTags(msg, "bbcode") - html = convertTags(msg, "html") + html = convertTags(msg, "html")+"
" msg = convertTags(msg, "text") modes = {"bbcode": bbcodemsg, "html": html, "text": msg} if not self.convos.has_key(handle): @@ -694,6 +694,9 @@ class PesterWindow(MovingWindow): self.idleaction.setCheckable(True) self.connect(self.idleaction, QtCore.SIGNAL('toggled(bool)'), self, QtCore.SLOT('toggleIdle(bool)')) + self.reconnectAction = QtGui.QAction(self.theme["main/menus/client/reconnect"], self) + self.connect(self.reconnectAction, QtCore.SIGNAL('triggered()'), + self, QtCore.SIGNAL('reconnectIRC()')) self.menu = QtGui.QMenuBar(self) @@ -704,6 +707,7 @@ class PesterWindow(MovingWindow): filemenu.addAction(userlistaction) filemenu.addAction(self.idleaction) filemenu.addAction(self.importaction) + filemenu.addAction(self.reconnectAction) filemenu.addAction(exitaction) changetheme = QtGui.QAction(self.theme["main/menus/profile/theme"], self) @@ -1000,6 +1004,7 @@ class PesterWindow(MovingWindow): self.memoaction.setText(theme["main/menus/client/memos"]) self.importaction.setText(theme["main/menus/client/import"]) self.idleaction.setText(theme["main/menus/client/idle"]) + self.reconnectAction.setText(theme["main/menus/client/reconnect"]) self.filemenu.setTitle(theme["main/menus/client/_name"]) self.changetheme.setText(theme["main/menus/profile/theme"]) self.changequirks.setText(theme["main/menus/profile/quirks"]) @@ -1642,6 +1647,7 @@ class PesterWindow(MovingWindow): leftChannel = QtCore.pyqtSignal(QtCore.QString) setChannelMode = QtCore.pyqtSignal(QtCore.QString, QtCore.QString, QtCore.QString) closeSignal = QtCore.pyqtSignal() + reconnectIRC = QtCore.pyqtSignal() class IRCThread(QtCore.QThread): def __init__(self, ircobj): @@ -1652,11 +1658,13 @@ class IRCThread(QtCore.QThread): irc.IRCConnect() while 1: if irc.brokenConnection: - self.exit(1) + self.finished.emit() + irc.closeConnection() + self.terminate() try: irc.updateIRC() except socket.error: - self.exit(1) + irc.setConnectionBroken() class PesterTray(QtGui.QSystemTrayIcon): def __init__(self, icon, mainwindow, parent): @@ -1790,6 +1798,10 @@ class MainProgram(QtCore.QObject): QtCore.SIGNAL('setChannelMode(QString, QString, QString)'), irc, QtCore.SLOT('setChannelMode(QString, QString, QString)')) + irc.connect(widget, + QtCore.SIGNAL('reconnectIRC()'), + irc, + QtCore.SLOT('reconnectIRC()')) # IRC --> Main window irc.connect(irc, QtCore.SIGNAL('connected()'), diff --git a/themes/pesterchum/style.js b/themes/pesterchum/style.js index 2f4fbe6..df8d68f 100644 --- a/themes/pesterchum/style.js +++ b/themes/pesterchum/style.js @@ -23,6 +23,7 @@ "userlist": "USERLIST", "import": "IMPORT", "idle": "IDLE", + "reconnect": "RECONNECT", "exit": "EXIT"}, "profile": {"_name": "PROFILE", "switch": "SWITCH",