Dont' toast messages from base bots
This commit is contained in:
parent
7dbe1e37d2
commit
525b2b1bf8
2 changed files with 8 additions and 4 deletions
|
@ -89,7 +89,7 @@ from memos import PesterMemo, MemoTabWindow, TimeTracker
|
||||||
from irc import PesterIRC
|
from irc import PesterIRC
|
||||||
from logviewer import PesterLogUserSelect, PesterLogViewer
|
from logviewer import PesterLogUserSelect, PesterLogViewer
|
||||||
from bugreport import BugReporter
|
from bugreport import BugReporter
|
||||||
from randomer import RandomHandler
|
from randomer import RandomHandler, RANDNICK
|
||||||
|
|
||||||
# Rawr, fuck you OSX leopard
|
# Rawr, fuck you OSX leopard
|
||||||
if not ostools.isOSXLeopard():
|
if not ostools.isOSXLeopard():
|
||||||
|
@ -103,6 +103,7 @@ canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosTor
|
||||||
"caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \
|
"caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \
|
||||||
"grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \
|
"grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \
|
||||||
"twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"]
|
"twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"]
|
||||||
|
BOTNAMES = ["NICKSERV", "CHANSERV", "MEMOSERV", "OPERSERV", "HELPSERV", "CALSPRITE", RANDNICK.upper()]
|
||||||
|
|
||||||
|
|
||||||
class waitingMessageHolder(object):
|
class waitingMessageHolder(object):
|
||||||
|
@ -1306,8 +1307,9 @@ class PesterWindow(MovingWindow):
|
||||||
t.show()
|
t.show()
|
||||||
elif not self.config.notifyOptions() & self.config.NEWCONVO:
|
elif not self.config.notifyOptions() & self.config.NEWCONVO:
|
||||||
if msg[:11] != "PESTERCHUM:":
|
if msg[:11] != "PESTERCHUM:":
|
||||||
t = self.tm.Toast("From: %s" % handle, re.sub("</?c(=.*?)?>", "", msg))
|
if handle.upper() not in BOTNAMES:
|
||||||
t.show()
|
t = self.tm.Toast("From: %s" % handle, re.sub("</?c(=.*?)?>", "", msg))
|
||||||
|
t.show()
|
||||||
else:
|
else:
|
||||||
if msg == "PESTERCHUM:CEASE":
|
if msg == "PESTERCHUM:CEASE":
|
||||||
t = self.tm.Toast("Closed Conversation", handle)
|
t = self.tm.Toast("Closed Conversation", handle)
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
|
|
||||||
|
RANDNICK = "randomEncounter"
|
||||||
|
|
||||||
class RandomHandler(QtCore.QObject):
|
class RandomHandler(QtCore.QObject):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
QtCore.QObject.__init__(self, parent)
|
QtCore.QObject.__init__(self, parent)
|
||||||
self.randNick = "randomEncounter"
|
self.randNick = RANDNICK
|
||||||
self.mainwindow = parent
|
self.mainwindow = parent
|
||||||
self.queue = []
|
self.queue = []
|
||||||
self.running = False
|
self.running = False
|
||||||
|
|
Loading…
Reference in a new issue