diff --git a/TODO b/TODO index 82c0394..f3e1ae1 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,14 @@ Features: +* dropped messages when chatting * X closes to tray * color text is not being translated to server? * convo backgrounds -- make them more like http://www.mspaintadventures.com/storyfiles/hs2/02546_2.gif -* PESTERLOG: in convo window * make other ppl ops +* turn off sound option!! * help button on quirks menu? -* tab recombining gives wrong window icon * help menu -- about and forum -- release alpha -* scroll bar style +* scroll bar style? * User commands/stop user from sending commands accidentally * shared buddy lists - changes to the buddy list should refresh it? multiple clients share buddy list??? diff --git a/convo.py b/convo.py index 6fb530f..aa541a7 100644 --- a/convo.py +++ b/convo.py @@ -127,12 +127,12 @@ class PesterTabWindow(QtGui.QFrame): self.mainwindow.waitingMessages.messageAnswered(handle) def initTheme(self, convo): self.resize(*convo["size"]) - self.setStyleSheet(convo["style"]) + self.setStyleSheet(convo["tabs"]["style"]) self.tabs.setShape(convo["tabs"]["tabstyle"]) self.tabs.setStyleSheet("QTabBar::tab{ %s } QTabBar::tab:selected { %s }" % (convo["tabs"]["style"], convo["tabs"]["selectedstyle"])) def changeTheme(self, theme): - self.initTheme(theme["memos"]) + self.initTheme(theme["convo"]) for c in self.convos.values(): tabi = self.tabIndices[c.title()] self.tabs.setTabIcon(tabi, c.icon()) diff --git a/convo.pyc b/convo.pyc index c869286..f1930fc 100644 Binary files a/convo.pyc and b/convo.pyc differ diff --git a/irc.py b/irc.py index 82def57..70b7b6d 100644 --- a/irc.py +++ b/irc.py @@ -4,6 +4,7 @@ from oyoyo.cmdhandler import DefaultCommandHandler from oyoyo import helpers import logging import random +import socket from dataobjs import Mood, PesterProfile from generic import PesterList @@ -19,72 +20,111 @@ class PesterIRC(QtCore.QObject): self.cli.command_handler.parent = self self.cli.command_handler.mainwindow = self.mainwindow self.conn = self.cli.connect() - + self.brokenConnection = False + def setConnectionBroken(self): + self.brokenConnection = True @QtCore.pyqtSlot(PesterProfile) def getMood(self, *chums): self.cli.command_handler.getMood(*chums) @QtCore.pyqtSlot(PesterList) def getMoods(self, chums): - self.cli.command_handler.getMood(*chums) - + self.cli.command_handler.getMood(*chums) @QtCore.pyqtSlot(QtCore.QString, QtCore.QString) def sendMessage(self, text, handle): h = unicode(handle) - helpers.msg(self.cli, h, text) - + try: + helpers.msg(self.cli, h, text) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString, bool) def startConvo(self, handle, initiated): h = unicode(handle) - if initiated: - helpers.msg(self.cli, h, "PESTERCHUM:BEGIN") - helpers.msg(self.cli, h, "COLOR >%s" % (self.mainwindow.profile().colorcmd())) + try: + if initiated: + helpers.msg(self.cli, h, "PESTERCHUM:BEGIN") + helpers.msg(self.cli, h, "COLOR >%s" % (self.mainwindow.profile().colorcmd())) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def endConvo(self, handle): h = unicode(handle) - helpers.msg(self.cli, h, "PESTERCHUM:CEASE") + try: + helpers.msg(self.cli, h, "PESTERCHUM:CEASE") + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot() def updateProfile(self): me = self.mainwindow.profile() handle = me.handle - helpers.nick(self.cli, handle) + try: + helpers.nick(self.cli, handle) + except socket.error: + self.setConnectionBroken() self.updateMood() @QtCore.pyqtSlot() def updateMood(self): me = self.mainwindow.profile() - helpers.msg(self.cli, "#pesterchum", "MOOD >%d" % (me.mood.value())) + try: + helpers.msg(self.cli, "#pesterchum", "MOOD >%d" % (me.mood.value())) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot() def updateColor(self): me = self.mainwindow.profile() for h in self.mainwindow.convos.keys(): - helpers.msg(self.cli, h, "COLOR >%s" % (self.mainwindow.profile().colorcmd())) + try: + helpers.msg(self.cli, h, "COLOR >%s" % (self.mainwindow.profile().colorcmd())) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def blockedChum(self, handle): h = unicode(handle) - helpers.msg(self.cli, h, "PESTERCHUM:BLOCK") + try: + helpers.msg(self.cli, h, "PESTERCHUM:BLOCK") + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def unblockedChum(self, handle): h = unicode(handle) - helpers.msg(self.cli, h, "PESTERCHUM:UNBLOCK") + try: + helpers.msg(self.cli, h, "PESTERCHUM:UNBLOCK") + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def requestNames(self, channel): c = unicode(channel) - helpers.names(self.cli, c) + try: + helpers.names(self.cli, c) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot() def requestChannelList(self): - helpers.channel_list(self.cli) + try: + helpers.channel_list(self.cli) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def joinChannel(self, channel): c = unicode(channel) - helpers.join(self.cli, c) + try: + helpers.join(self.cli, c) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString) def leftChannel(self, channel): c = unicode(channel) - helpers.part(self.cli, c) + try: + helpers.part(self.cli, c) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString, QtCore.QString) def kickUser(self, handle, channel): c = unicode(channel) h = unicode(handle) - helpers.kick(self.cli, h, c) + try: + helpers.kick(self.cli, h, c) + except socket.error: + self.setConnectionBroken() @QtCore.pyqtSlot(QtCore.QString, QtCore.QString, QtCore.QString) def setChannelMode(self, channel, mode, command): c = unicode(channel) @@ -92,7 +132,10 @@ class PesterIRC(QtCore.QObject): cmd = unicode(command) if cmd == "": cmd = None - helpers.mode(self.cli, c, m, cmd) + try: + helpers.mode(self.cli, c, m, cmd) + except socket.error: + self.setConnectionBroken() def updateIRC(self): self.conn.next() @@ -112,6 +155,8 @@ class PesterIRC(QtCore.QObject): class PesterHandler(DefaultCommandHandler): def privmsg(self, nick, chan, msg): # display msg, do other stuff + if len(msg) == 0: + return # silently ignore CTCP if msg[0] == '\x01': return @@ -223,8 +268,15 @@ class PesterHandler(DefaultCommandHandler): for c in chums: chandle = c.handle if len(chumglub+chandle) >= 350: - helpers.msg(self.client, "#pesterchum", chumglub) + try: + helpers.msg(self.client, "#pesterchum", chumglub) + except socket.error: + self.parent.setConnectionBroken() chumglub = "GETMOOD " chumglub += chandle if chumglub != "GETMOOD ": - helpers.msg(self.client, "#pesterchum", chumglub) + try: + helpers.msg(self.client, "#pesterchum", chumglub) + except socket.error: + self.parent.setConnectionBroken() + diff --git a/irc.pyc b/irc.pyc index 29bc2ff..3bc3deb 100644 Binary files a/irc.pyc and b/irc.pyc differ diff --git a/logs/chums.js b/logs/chums.js index 5a50b36..4c68cba 100644 --- a/logs/chums.js +++ b/logs/chums.js @@ -1 +1 @@ -{"macruralAlchemist": {"color": "#700000", "handle": "macruralAlchemist", "mood": "offline"}, "fireSwallow": {"color": "#80bb9a", "handle": "fireSwallow", "mood": "offline"}, "aquaMarinist": {"color": "#00caca", "handle": "aquaMarinist", "mood": "offline"}, "nitroZealist": {"color": "#ff3737", "handle": "nitroZealist", "mood": "offline"}, "mechanicalSpectacle": {"color": "#000000", "handle": "mechanicalSpectacle", "mood": "offline"}, "caffeinatedAnalyst": {"color": "#aa0000", "handle": "caffeinatedAnalyst", "mood": "offline"}, "iw": {"color": "#ff0000", "handle": "iw", "mood": "offline"}, "pesterClient394": {"color": "#ff3737", "handle": "pesterClient394", "mood": "offline"}, "absoluteTranquility": {"color": "#000033", "handle": "absoluteTranquility", "mood": "offline"}, "centaursTesticle": {"color": "#000056", "handle": "centaursTesticle", "mood": "offline"}, "agogPorphyry": {"color": "#522d80", "handle": "agogPorphyry", "mood": "offline"}, "radicalApologist": {"color": "#ffaa00", "handle": "radicalApologist", "mood": "offline"}, "arachnidsGrip": {"color": "#005682", "handle": "arachnidsGrip", "mood": "offline"}, "illuminatedWax": {"color": "#ffff00", "handle": "illuminatedWax", "mood": "offline"}, "gamblingGenocider": {"color": "#00ff00", "handle": "gamblingGenocider", "mood": "offline"}, "elegantDiversion": {"color": "#12b40d", "handle": "elegantDiversion", "mood": "offline"}, "madLurker": {"color": "#000000", "handle": "madLurker", "mood": "offline"}, "testOut": {"color": "#c760cc", "handle": "testOut", "mood": "offline"}, "DocScratch": {"color": "#ffffff", "handle": "DocScratch", "mood": "offline"}, "recalcitrantDisaster": {"color": "#8b0068", "handle": "recalcitrantDisaster", "mood": "offline"}, "superGhost": {"color": "#800564", "handle": "superGhost", "mood": "offline"}, "tentacleTherapist": {"color": "#cc66ff", "handle": "tentacleTherapist", "mood": "offline"}, "aquaticMarinist": {"color": "#00caca", "handle": "aquaticMarinist", "mood": "offline"}, "captainCaveman": {"color": "#7c414e", "handle": "captainCaveman", "mood": "offline"}, "cuttlefishCuller": {"color": "#77003c", "handle": "cuttlefishCuller", "mood": "offline"}, "masterG": {"color": "#77003c", "handle": "masterG", "mood": "offline"}, "plasmaModerator": {"color": "#5685cc", "handle": "plasmaModerator", "mood": "offline"}, "remoteBloodbath": {"color": "#c70000", "handle": "remoteBloodbath", "mood": "offline"}, "rageInducer": {"color": "#00ffff", "handle": "rageInducer", "mood": "offline"}, "gallowsCalibrator": {"color": "#008282", "handle": "gallowsCalibrator", "mood": "offline"}, "greenZephyr": {"color": "#00ca40", "handle": "greenZephyr", "mood": "offline"}, "lawdEngrish": {"color": "#00ff00", "handle": "lawdEngrish", "mood": "offline"}, "adiosToreador": {"color": "#aa5500", "handle": "adiosToreador", "mood": "offline"}, "schlagzeugGator": {"color": "#61821f", "handle": "schlagzeugGator", "mood": "offline"}, "metaliAggressive": {"color": "#9289d5", "handle": "metaliAggressive", "mood": "offline"}, "magmaExploiter": {"color": "#d90000", "handle": "magmaExploiter", "mood": "offline"}, "gardenGnostic": {"color": "#00ff00", "handle": "gardenGnostic", "mood": "offline"}, "unknownTraveler": {"color": "#006666", "handle": "unknownTraveler", "mood": "offline"}, "utilitarianTurnabout": {"color": "#dd0000", "handle": "utilitarianTurnabout", "mood": "offline"}, "marineAquist": {"color": "#00caca", "handle": "marineAquist", "mood": "offline"}} \ No newline at end of file +{"macruralAlchemist": {"color": "#700000", "handle": "macruralAlchemist", "mood": "offline"}, "lyricalKeraunoscopic": {"color": "#00c000", "handle": "lyricalKeraunoscopic", "mood": "offline"}, "fireSwallow": {"color": "#80bb9a", "handle": "fireSwallow", "mood": "offline"}, "aquaMarinist": {"color": "#00caca", "handle": "aquaMarinist", "mood": "offline"}, "nitroZealist": {"color": "#ff3737", "handle": "nitroZealist", "mood": "offline"}, "mechanicalSpectacle": {"color": "#000000", "handle": "mechanicalSpectacle", "mood": "offline"}, "greyscalePacifist": {"color": "#7f7f7f", "handle": "greyscalePacifist", "mood": "offline"}, "caffeinatedAnalyst": {"color": "#aa0000", "handle": "caffeinatedAnalyst", "mood": "offline"}, "iw": {"color": "#ff0000", "handle": "iw", "mood": "offline"}, "insipidTranscient": {"color": "#104e68", "handle": "insipidTranscient", "mood": "offline"}, "pesterClient394": {"color": "#ff3737", "handle": "pesterClient394", "mood": "offline"}, "absoluteTranquility": {"color": "#000033", "handle": "absoluteTranquility", "mood": "offline"}, "centaursTesticle": {"color": "#000056", "handle": "centaursTesticle", "mood": "offline"}, "agogPorphyry": {"color": "#522d80", "handle": "agogPorphyry", "mood": "offline"}, "DocScratch": {"color": "#ffffff", "handle": "DocScratch", "mood": "offline"}, "apocalypseArisen": {"color": "#a10000", "handle": "apocalypseArisen", "mood": "offline"}, "radicalApologist": {"color": "#ffaa00", "handle": "radicalApologist", "mood": "offline"}, "microMachines": {"color": "#aa00ff", "handle": "microMachines", "mood": "offline"}, "arachnidsGrip": {"color": "#005682", "handle": "arachnidsGrip", "mood": "offline"}, "illuminatedWax": {"color": "#ffff00", "handle": "illuminatedWax", "mood": "offline"}, "tentacleTherapist": {"color": "#cc66ff", "handle": "tentacleTherapist", "mood": "offline"}, "gamblingGenocider": {"color": "#00ff00", "handle": "gamblingGenocider", "mood": "offline"}, "elegantDiversion": {"color": "#14b40a", "handle": "elegantDiversion", "mood": "offline"}, "madLurker": {"color": "#000000", "handle": "madLurker", "mood": "offline"}, "testOut": {"color": "#c760cc", "handle": "testOut", "mood": "offline"}, "androidTechnician": {"color": "#0000ff", "handle": "androidTechnician", "mood": "offline"}, "recalcitrantDisaster": {"color": "#8b0068", "handle": "recalcitrantDisaster", "mood": "offline"}, "superGhost": {"color": "#800564", "handle": "superGhost", "mood": "offline"}, "arsenicCatnip": {"color": "#006400", "handle": "arsenicCatnip", "mood": "offline"}, "aquaticMarinist": {"color": "#00caca", "handle": "aquaticMarinist", "mood": "offline"}, "captainCaveman": {"color": "#7c414e", "handle": "captainCaveman", "mood": "offline"}, "cuttlefishCuller": {"color": "#77003c", "handle": "cuttlefishCuller", "mood": "offline"}, "carcinoGeneticist": {"color": "#999999", "handle": "carcinoGeneticist", "mood": "offline"}, "masterG": {"color": "#77003c", "handle": "masterG", "mood": "offline"}, "plasmaModerator": {"color": "#5685cc", "handle": "plasmaModerator", "mood": "offline"}, "carcinoGenetecist": {"color": "#7f7f7f", "handle": "carcinoGenetecist", "mood": "offline"}, "remoteBloodbath": {"color": "#c70000", "handle": "remoteBloodbath", "mood": "offline"}, "moirailBunp": {"color": "#6a3d0f", "handle": "moirailBunp", "mood": "offline"}, "rageInducer": {"color": "#00ffff", "handle": "rageInducer", "mood": "offline"}, "gallowsCalibrator": {"color": "#008282", "handle": "gallowsCalibrator", "mood": "offline"}, "greenZephyr": {"color": "#00ca40", "handle": "greenZephyr", "mood": "offline"}, "lawdEngrish": {"color": "#00ff00", "handle": "lawdEngrish", "mood": "offline"}, "adiosToreador": {"color": "#aa5500", "handle": "adiosToreador", "mood": "offline"}, "maxiumumFatness": {"color": "#3366ff", "handle": "maxiumumFatness", "mood": "offline"}, "schlagzeugGator": {"color": "#61821f", "handle": "schlagzeugGator", "mood": "offline"}, "metaliAggressive": {"color": "#9289d5", "handle": "metaliAggressive", "mood": "offline"}, "midnightSparrow": {"color": "#ff55ff", "handle": "midnightSparrow", "mood": "offline"}, "magmaExploiter": {"color": "#d90000", "handle": "magmaExploiter", "mood": "offline"}, "zealousScarecrow": {"color": "#00c882", "handle": "zealousScarecrow", "mood": "offline"}, "gardenGnostic": {"color": "#00ff00", "handle": "gardenGnostic", "mood": "offline"}, "unknownTraveler": {"color": "#006666", "handle": "unknownTraveler", "mood": "offline"}, "utilitarianTurnabout": {"color": "#dd0000", "handle": "utilitarianTurnabout", "mood": "offline"}, "marineAquist": {"color": "#00caca", "handle": "marineAquist", "mood": "offline"}} \ No newline at end of file diff --git a/memos.py b/memos.py index 2de5da2..e417e77 100644 --- a/memos.py +++ b/memos.py @@ -76,10 +76,12 @@ class TimeGrammar(object): class TimeTracker(list): def __init__(self, time=None): self.timerecord = {"P": [], "F": []} + self.open = {} if time is not None: self.append(time) self.current=0 self.addRecord(time) + self.open[time] = False else: self.current=-1 def addTime(self, timed): @@ -90,6 +92,7 @@ class TimeTracker(list): except ValueError: self.current = len(self) self.append(timed) + self.open[timed] = False self.addRecord(timed) return False def prevTime(self): @@ -121,9 +124,19 @@ class TimeTracker(list): try: self.pop(self.index(timed)) self.current = len(self)-1 + del self.open[timed] return True except ValueError: return None + def openTime(self, time): + if self.open.has_key(time): + self.open[time] = True + def openCurrentTime(self): + timed = self.getTime() + self.openTime(timed) + def isFirstTime(self): + timed = self.getTime() + return not self.open[timed] def getTime(self): if self.current >= 0: return self[self.current] @@ -235,22 +248,25 @@ class MemoText(PesterText): newtime = timedelta(0) time = TimeTracker(newtime) parent.times[chum.handle] = time - timeGrammar = time.getGrammar() - 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 + if time.isFirstTime(): + grammar = time.getGrammar() + joinmsg = chum.memojoinmsg(systemColor, time.getTime(), grammar, window.theme["convo/text/joinmemo"]) + self.append(convertTags(joinmsg)) + parent.mainwindow.chatlog.log(parent.channel, convertTags(msg, "bbcode")) + time.openCurrentTime() + if msg[0:3] == "/me" or msg[0:13] == "PESTERCHUM:ME": if msg[0:3] == "/me": start = 3 else: start = 13 space = msg.find(" ") - msg = chum.memsg(systemColor, msg[start:space], msg[space:], time=time.getGrammar()) + memsg = chum.memsg(systemColor, msg[start:space], msg[space:], time=time.getGrammar()) window.chatlog.log(parent.channel, convertTags(msg, "bbcode")) - self.append(convertTags(msg)) + self.append(convertTags(memsg)) else: if chum is not me: msg = addTimeInitial(msg, parent.times[chum.handle].getGrammar()) @@ -359,6 +375,7 @@ class PesterMemo(PesterConvo): timeGrammar = self.time.getGrammar() systemColor = QtGui.QColor(self.mainwindow.theme["memos/systemMsgColor"]) msg = p.memoopenmsg(systemColor, self.time.getTime(), timeGrammar, self.mainwindow.theme["convo/text/openmemo"], self.channel) + self.time.openCurrentTime() self.textArea.append(convertTags(msg)) self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) @@ -455,8 +472,6 @@ class PesterMemo(PesterConvo): color = chumdb.getColor(handle, defaultcolor) item.setTextColor(color) self.userlist.addItem(item) - self.userlist - def timeUpdate(self, handle, cmd): window = self.mainwindow @@ -491,19 +506,11 @@ class PesterMemo(PesterConvo): self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) elif timed not in self.times[handle]: self.times[handle].addTime(timed) - grammar = self.times[handle].getGrammar() - msg = chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"]) - self.textArea.append(convertTags(msg)) - self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) else: self.times[handle].setCurrent(timed) else: if timed is not None: ttracker = TimeTracker(timed) - grammar = ttracker.getGrammar() - msg = chum.memojoinmsg(systemColor, timed, grammar, window.theme["convo/text/joinmemo"]) - self.textArea.append(convertTags(msg)) - self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) self.times[handle] = ttracker @QtCore.pyqtSlot() @@ -511,6 +518,8 @@ class PesterMemo(PesterConvo): text = self.textInput.text() if text == "": return + if self.time.getTime() == None: + self.sendtime() grammar = self.time.getGrammar() # deal with quirks here qtext = self.mainwindow.userprofile.quirks.apply(unicode(text)) @@ -573,7 +582,6 @@ class PesterMemo(PesterConvo): if update == "nick": self.addUser(newnick) elif update == "kick": - print "KICKING" if len(chums) == 0: return c = chums[0] @@ -613,6 +621,7 @@ class PesterMemo(PesterConvo): self.resetSlider(curtime) self.mainwindow.joinChannel.emit(self.channel) me = self.mainwindow.profile() + self.time.openCurrentTime() msg = me.memoopenmsg(systemColor, self.time.getTime(), self.time.getGrammar(), self.mainwindow.theme["convo/text/openmemo"], self.channel) self.textArea.append(convertTags(msg)) self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) @@ -643,10 +652,11 @@ class PesterMemo(PesterConvo): return currentHandle = unicode(self.userlist.currentItem().text()) self.mainwindow.kickUser.emit(currentHandle, self.channel) - def resetSlider(self, time): + def resetSlider(self, time, send=True): self.timeinput.setText(delta2txt(time)) self.timeinput.setSlider() - self.sendtime() + if send: + self.sendtime() @QtCore.pyqtSlot() def sendtime(self): @@ -654,10 +664,6 @@ class PesterMemo(PesterConvo): systemColor = QtGui.QColor(self.mainwindow.theme["memos/systemMsgColor"]) time = txt2delta(self.timeinput.text()) present = self.time.addTime(time) - if not present: - msg = me.memojoinmsg(systemColor, time, self.time.getGrammar(), self.mainwindow.theme["convo/text/joinmemo"]) - self.textArea.append(convertTags(msg)) - self.mainwindow.chatlog.log(self.channel, convertTags(msg, "bbcode")) serverText = "PESTERCHUM:TIME>"+delta2txt(time, "server") self.messageSent.emit(serverText, self.title()) @@ -676,7 +682,9 @@ class PesterMemo(PesterConvo): newtime = self.time.getTime() if newtime is None: newtime = timedelta(0) - self.resetSlider(newtime) + self.resetSlider(newtime, send=False) + else: + self.resetSlider(newtime) @QtCore.pyqtSlot() def prevtime(self): time = self.time.prevTime() diff --git a/memos.pyc b/memos.pyc index 577a5f0..0ba617b 100644 Binary files a/memos.pyc and b/memos.pyc differ diff --git a/parsetools.py b/parsetools.py index da7231e..b52f567 100644 --- a/parsetools.py +++ b/parsetools.py @@ -42,9 +42,7 @@ def convertTags(string, format="html"): return matchobj.group(1) string = _urlre.sub(urlrep, string) if format == "html": - print string string = _memore.sub(r" \1", string) - print string return string def escapeBrackets(string): diff --git a/parsetools.pyc b/parsetools.pyc index d52cb82..a872cfc 100644 Binary files a/parsetools.pyc and b/parsetools.pyc differ diff --git a/pesterchum.js b/pesterchum.js index 233397c..3f6e37c 100644 --- a/pesterchum.js +++ b/pesterchum.js @@ -1 +1 @@ -{"tabs": false, "chums": ["marineAquist", "unknownTraveler", "tentacleTherapist", "macruralAlchemist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "testOut", "aquaMarinist"], "defaultprofile": "testProfile", "block": []} \ No newline at end of file +{"tabs": false, "chums": ["marineAquist", "unknownTraveler", "tentacleTherapist", "macruralAlchemist", "vaginalEngineer", "mechanicalSpectacle", "carcinoGeneticist", "schlagzeugGator", "gamblingGenocider", "gardenGnostic", "superGhost", "centaursTesticle", "arachnidsGrip", "grimAuxiliatrix", "remoteBloodbath", "nitroZealist", "greenZephyr", "arsenicCatnip", "adiosToreador", "cuttlefishCuller", "rageInducer", "gallowsCalibrator", "caligulasAquarium", "terminallyCapricious", "illuminatedWax", "aquaMarinist", "maxiumumFatness", "elegantDiversion", "moirailBunp", "uroborosUnbound", "androidTechnician", "midnightSparrow", "apocalypseArisen"], "defaultprofile": "testProfile", "block": []} \ No newline at end of file diff --git a/pesterchum.py b/pesterchum.py index 78f2715..4b236a1 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -1495,6 +1495,8 @@ class IRCThread(QtCore.QThread): irc = self.irc irc.IRCConnect() while 1: + if irc.brokenConnection: + self.exit(1) try: irc.updateIRC() except socket.error: diff --git a/profiles/ghostDunk.js b/profiles/ghostDunk.js index 7c7adc1..338c689 100644 --- a/profiles/ghostDunk.js +++ b/profiles/ghostDunk.js @@ -1 +1 @@ -{"color": "#ff00ff", "theme": "pesterchum7", "quirks": [], "handle": "ghostDunk"} \ No newline at end of file +{"color": "#ff00ff", "theme": "pesterchum", "quirks": [], "handle": "ghostDunk"} \ No newline at end of file diff --git a/profiles/testProfile.js b/profiles/testProfile.js index 223100d..e63a331 100644 --- a/profiles/testProfile.js +++ b/profiles/testProfile.js @@ -1 +1 @@ -{"color": "#aa00ff", "theme": "trollian", "quirks": [], "handle": "testProfile"} \ No newline at end of file +{"color": "#aa00ff", "theme": "pesterchum", "quirks": [], "handle": "testProfile"} \ No newline at end of file diff --git a/themes/pesterchum/style.js b/themes/pesterchum/style.js index aea785d..171bd6c 100644 --- a/themes/pesterchum/style.js +++ b/themes/pesterchum/style.js @@ -190,6 +190,7 @@ }, "convo": {"style": "background-color: #fdb302; background-image:url($path/convobg.png); background-repeat: no-repeat; border:2px solid yellow; font-family: 'Courier'", + "tabstyle": "background-color: #fdb302; font-family: 'Courier'", "scrollbar": { "style" : "", "handle": "" }, "margins": {"top": 0, "bottom": 6, "left": 0, "right": 0 }, "size": [520, 325], diff --git a/themes/trollian/style.js b/themes/trollian/style.js index 3074757..6315787 100644 --- a/themes/trollian/style.js +++ b/themes/trollian/style.js @@ -236,6 +236,7 @@ }, "convo": {"style": "background: rgb(190, 19, 4); font-family: 'Arial';", + "tabstyle": "background: rgb(190, 19, 4); font-family: 'Arial'", "scrollbar": { "style" : "", "handle": "" }, "margins": {"top": 22, "bottom": 9, "left": 10, "right": 4 }, "size": [400, 250],