Menu Fixes + IRC help (#7)

This commit is contained in:
arcaneAgilmente 2021-02-21 10:40:03 -05:00 committed by GitHub
parent 0d36d73eee
commit 78666ce904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 9 deletions

View file

@ -16,8 +16,6 @@
* Don't make new windows be all in your face and shit * Don't make new windows be all in your face and shit
* Hide offline friends per group * Hide offline friends per group
* LET PEOPLE TURN OFF HONKING - people already rename the soundfile and such to
do this manually
* Add support for displaying more verbose information (e.g. Cease messages which * Add support for displaying more verbose information (e.g. Cease messages which
tell you more than the abbreviation of who left) tell you more than the abbreviation of who left)
@ -174,6 +172,8 @@ version of the client. There aren't really any other options.
* Make console users able to check widget theme/style information via mouseover * Make console users able to check widget theme/style information via mouseover
and key combo (for people making themes or debugging) and key combo (for people making themes or debugging)
* This is presently Ctrl+Alt+w, after opening the console (Ctrl+~). * This is presently Ctrl+Alt+w, after opening the console (Ctrl+~).
* LET PEOPLE TURN OFF HONKING - people already rename the soundfile and such to
do this manually (append "honk":false to the end of pesterchum.js ; that kills it.)
### Backend ### Backend
* Perpetual code cleanup, refactoring, simplification and general improvements * Perpetual code cleanup, refactoring, simplification and general improvements

38
irc.py
View file

@ -349,6 +349,10 @@ class PesterHandler(DefaultCommandHandler):
if len(msg) == 0: if len(msg) == 0:
return return
# silently ignore CTCP # silently ignore CTCP
# Notice IRC /me (The CTCP kind)
if msg[0:8] == '\x01ACTION ':
msg = '/me' + msg[7:-1]
# silently ignore the rest of the CTCPs
if msg[0] == '\x01': if msg[0] == '\x01':
handle = nick[0:nick.find("!")] handle = nick[0:nick.find("!")]
logging.warning("---> recv \"CTCP %s :%s\"" % (handle, msg[1:-1])) logging.warning("---> recv \"CTCP %s :%s\"" % (handle, msg[1:-1]))
@ -497,6 +501,17 @@ class PesterHandler(DefaultCommandHandler):
if channel not in self.channelnames: if channel not in self.channelnames:
self.channelnames[channel] = [] self.channelnames[channel] = []
self.channelnames[channel].extend(namelist) self.channelnames[channel].extend(namelist)
def ison(self, server, nick, nicks):
nicklist = nicks.split(" ")
getglub = "GETMOOD "
logging.info("---> recv \"ISON :%s\"" % nicks)
for nick_it in nicklist:
self.parent.moodUpdated.emit(nick_it, Mood(0))
if nick_it in self.parent.mainwindow.namesdb["#pesterchum"]:
getglub += nick_it
if getglub != "GETMOOD ":
helpers.msg(self.client, "#pesterchum", getglub)
def endofnames(self, server, nick, channel, msg): def endofnames(self, server, nick, channel, msg):
namelist = self.channelnames[channel] namelist = self.channelnames[channel]
pl = PesterList(namelist) pl = PesterList(namelist)
@ -506,12 +521,7 @@ class PesterHandler(DefaultCommandHandler):
self.joined = True self.joined = True
self.parent.mainwindow.randhandler.setRunning(self.parent.mainwindow.randhandler.randNick in namelist) self.parent.mainwindow.randhandler.setRunning(self.parent.mainwindow.randhandler.randNick in namelist)
chums = self.mainwindow.chumList.chums chums = self.mainwindow.chumList.chums
lesschums = [] self.isOn(*chums)
for c in chums:
chandle = c.handle
if chandle in namelist:
lesschums.append(c)
self.getMood(*lesschums)
def liststart(self, server, handle, *info): def liststart(self, server, handle, *info):
self.channel_list = [] self.channel_list = []
@ -565,3 +575,19 @@ class PesterHandler(DefaultCommandHandler):
except socket.error: except socket.error:
self.parent.setConnectionBroken() self.parent.setConnectionBroken()
def isOn(self, *chums):
isonNicks = ""
for c in chums:
chandle = c.handle
if len(chandle) >= 200:
try:
self.client.send("ISON", ":%s" % (isonNicks))
except socket.error:
self.parent.setConnectionBroken()
isonNicks = ""
isonNicks += " " + chandle
if isonNicks != "":
try:
self.client.send("ISON", ":%s" % (isonNicks))
except socket.error:
self.parent.setConnectionBroken()

View file

@ -1821,6 +1821,7 @@ class AboutPesterchum(QtGui.QDialog):
oakwhiz\n\ oakwhiz\n\
alGore\n\ alGore\n\
Cerxi (binaryCabalist)\n\ Cerxi (binaryCabalist)\n\
Arcane (arcaneAgilmente)\n\
karxi (Midna)\n\ karxi (Midna)\n\
\n\ \n\
Art by:\n\ Art by:\n\

View file

@ -2922,9 +2922,10 @@ class PesterWindow(MovingWindow):
self.newConversation("nickServ") self.newConversation("nickServ")
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def launchHelp(self): def launchHelp(self):
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://nova.xzibition.com/~illuminatedwax/help.html", QtCore.QUrl.TolerantMode)) QtGui.QDesktopServices.openUrl(QtCore.QUrl("https://forum.homestuck.xyz/viewtopic.php?f=7&t=467", QtCore.QUrl.TolerantMode))
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def reportBug(self): def reportBug(self):
QtGui.QDesktopServices.openUrl(QtCore.QUrl("https://github.com/Dpeta/pesterchum-alt-servers/issues", QtCore.QUrl.TolerantMode))
if hasattr(self, 'bugreportwindow') and self.bugreportwindow: if hasattr(self, 'bugreportwindow') and self.bugreportwindow:
return return
self.bugreportwindow = BugReporter(self) self.bugreportwindow = BugReporter(self)