ban/kick message to msgbox
This commit is contained in:
parent
c32e54de7f
commit
4571b6dce7
2 changed files with 19 additions and 6 deletions
7
irc.py
7
irc.py
|
@ -543,11 +543,8 @@ class PesterHandler(DefaultCommandHandler):
|
|||
|
||||
# Server-set usermodes don't need to be passed.
|
||||
if (handles == ['']) & ( ('x' in m) | ('z' in m) | ('o' in m) | ('x' in m) )!=True:
|
||||
try:
|
||||
self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op))
|
||||
except:
|
||||
PchumLog.exception('')
|
||||
|
||||
self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op))
|
||||
|
||||
#self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op))
|
||||
# Passing an empty handle here might cause a crash.
|
||||
#except IndexError:
|
||||
|
|
18
memos.py
18
memos.py
|
@ -1251,7 +1251,23 @@ class PesterMemo(PesterConvo):
|
|||
msgbox = QtWidgets.QMessageBox()
|
||||
msgbox.setStyleSheet("QMessageBox{" + self.mainwindow.theme["main/defaultwindow/style"] + "}")
|
||||
msgbox.setText(self.mainwindow.theme["convo/text/kickedmemo"])
|
||||
msgbox.setInformativeText("press 0k to rec0nnect or cancel to absc0nd")
|
||||
|
||||
# Add ban(kick) reason
|
||||
# l = split update
|
||||
if len(l) >= 3:
|
||||
if l[1] != l[2]: # If there's no reason then reason is set to handle
|
||||
# Process spare ':' characters (this might not be safe?)
|
||||
aggrievocation = l[1] + ": " + l[2]
|
||||
if len(l) > 3:
|
||||
aggrievocation += ':'
|
||||
for x in range(3, len(l)):
|
||||
aggrievocation += l[x] + ':'
|
||||
aggrievocation = aggrievocation.strip(':')
|
||||
msgbox.setInformativeText("%s\n\npress 0k to rec0nnect or cancel to absc0nd" % aggrievocation)
|
||||
else:
|
||||
msgbox.setInformativeText("press 0k to rec0nnect or cancel to absc0nd")
|
||||
else:
|
||||
msgbox.setInformativeText("press 0k to rec0nnect or cancel to absc0nd")
|
||||
msgbox.setStandardButtons(QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel)
|
||||
# Find the OK button and make it default
|
||||
for b in msgbox.buttons():
|
||||
|
|
Loading…
Reference in a new issue