Esempio n. 1
0
import socket
from time import time

from mood import Mood
from dataobjs import PesterProfile
from generic import PesterList
from version import _pcVersion

import ostools
try:
    QString = unicode
except NameError:
    # Python 3
    QString = str

if ostools.isOSXBundle():
    logging.basicConfig(level=logging.WARNING)
else:
    # karxi; We do NOT need this set to INFO; it's very, very spammy.
    logging.basicConfig(level=logging.WARNING)

class PesterIRC(QtCore.QThread):
    def __init__(self, config, window):
        QtCore.QThread.__init__(self)
        self.mainwindow = window
        self.config = config
        self.registeredIRC = False
        self.stopIRC = None
        self.NickServ = services.NickServ()
        self.ChanServ = services.ChanServ()
    def IRCConnect(self):
Esempio n. 2
0
    ":perky:": "perky.png",
    ":acceptant:": "acceptant.png",
    ":olliesouty:": "olliesouty.gif",
    ":billiards:": "poolballS.gif",
    ":billiardslarge:": "poolballL.gif",
    ":whatdidyoudo:": "whatdidyoudo.gif",
    ":brocool:": "pcstrider.png",
    ":trollbro:": "trollbro.png",
    ":playagame:": "saw.gif",
    ":trollc00l:": "trollc00l.png",
    ":suckers:": "Suckers.gif",
    ":scorpio:": "scorpio.gif",
    ":shades:": "shades.png",
    }

if ostools.isOSXBundle():
    for emote in smiledict:
        graphic = smiledict[emote]
        if graphic.find(".gif"):
            graphic = graphic.replace(".gif", ".png")
            smiledict[emote] = graphic




reverse_smiley = dict((v,k) for k, v in smiledict.iteritems())
_smilere = re.compile("|".join(smiledict.keys()))

class ThemeException(Exception):
    def __init__(self, value):
        self.parameter = value