Notify user when server is full

This commit is contained in:
Kiooeht 2011-06-20 16:18:47 -07:00
parent 20478c94b3
commit c8752dd29b
4 changed files with 15 additions and 1 deletions

View file

@ -47,6 +47,7 @@ CHANGELOG
* Flash the taskbar on new messages - Kiooeht [evacipatedBox]
* Third beep sound for when your initials are mentioned in memos - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
* Ctrl + click to copy links - Kiooeht [evacipatedBox]
* Say something when server is full - Kiooeht [evacipatedBox]
* Bug fixes
* Logviewer updates - Kiooeht [evacipatedBox]
* Memo scrollbar thing - Kiooeht [evacipatedBox]

3
irc.py
View file

@ -283,6 +283,7 @@ class PesterIRC(QtCore.QThread):
userPresentUpdate = QtCore.pyqtSignal(QtCore.QString, QtCore.QString,
QtCore.QString)
cannotSendToChan = QtCore.pyqtSignal(QtCore.QString, QtCore.QString)
tooManyPeeps = QtCore.pyqtSignal()
class PesterHandler(DefaultCommandHandler):
def notice(self, nick, chan, msg):
@ -467,6 +468,8 @@ class PesterHandler(DefaultCommandHandler):
self.parent.modesUpdated.emit(channel, modes)
def cannotsendtochan(self, server, handle, channel, msg):
self.parent.cannotSendToChan.emit(channel, msg)
def toomanypeeps(self, *stuff):
self.parent.tooManyPeeps.emit()
def getMood(self, *chums):
chumglub = "GETMOOD "

View file

@ -23,6 +23,7 @@ numeric_events = {
"003": "created",
"004": "myinfo",
"005": "featurelist", # XXX
"010": "toomanypeeps",
"200": "tracelink",
"201": "traceconnecting",
"202": "tracehandshake",

View file

@ -2843,6 +2843,13 @@ class PesterWindow(MovingWindow):
# show context menu i guess
#self.showTrayContext.emit()
@QtCore.pyqtSlot()
def tooManyPeeps(self):
msg = QtGui.QMessageBox(self)
msg.setText("D: TOO MANY PEOPLE!!!")
msg.setInformativeText("The server has hit max capacity. Please try again later.")
msg.show()
pcUpdate = QtCore.pyqtSignal(QtCore.QString, QtCore.QString)
closeToTraySignal = QtCore.pyqtSignal()
newConvoStarted = QtCore.pyqtSignal(QtCore.QString, bool, name="newConvoStarted")
@ -3064,7 +3071,9 @@ class MainProgram(QtCore.QObject):
('modesUpdated(QString, QString)',
'modesUpdated(QString, QString)'),
('cannotSendToChan(QString, QString)',
'cannotSendToChan(QString, QString)')
'cannotSendToChan(QString, QString)'),
('tooManyPeeps()',
'tooManyPeeps()')
]
def connectWidgets(self, irc, widget):
self.connect(irc, QtCore.SIGNAL('finished()'),