Dpeta / pesterchum-alt-servers

Instant messaging client copying the look and feel of clients from Andrew Hussie's webcomic Homestuck.
https://pesterchum.xyz
GNU General Public License v3.0
78 stars 20 forks source link

Pchum closes when i open my memos #56

Closed CornBatton closed 3 years ago

CornBatton commented 3 years ago

whenever i open a memo after claiming ownership with ChanServ, the whole pchum app closes and i have to drop the memo/channel in order to be able to open it again. it started to happen around the time 2.0.0 came out if i remember correctly and caused me to take a break in the hopes it'd be fixed but surprisingly it still happens. i don't even get an error message either, the whole thing just crashes and closes the whole app.

Dpeta commented 3 years ago

It took me a bit to figure out exactly what caused the crash, but this should hopefully be fixed now in 5b4673e0dd6c1996b506be42bf090cdcc27e866a, I'll try to put up a new release soon.

I was able to reproduce this pretty easily, so I was surprised I'd not heard anyone mention having an issue like this before, but I think it's probably because the crash is a bit specific. It's caused by Pesterchum not being able to handle chanServ setting both a user's and a memo's mode in a singe MODE command. This happens only when a user with AUTOOP enabled opened opened a non-persistent and empty memo owned by them or when they registered a memo while being the only person in it.

Until I've gotten around to putting up the release you should hopefully be able to resolve this by disabling autoop with nickserv via set autoop off and then manually OP-ing yourself by messaging op #channel to chanserv while you're inside your channel.

Dpeta commented 3 years ago

For reference, the error for me was:

Traceback (most recent call last):
  File "/home/XXX/Desktop/pesterchum-alt-servers/memos.py", line 1111, in userPresentChange
    msg = chum.memoopmsg(opchum, opgrammar, systemColor)
  File "/home/XXX/Desktop/pesterchum-alt-servers/dataobjs.py", line 275, in memoopmsg
    (opchum.colorhtml(), opinit, self.colorhtml(), self.initials())
  File "/home/XXX/Desktop/pesterchum-alt-servers/dataobjs.py", line 176, in initials
    initials = (handle[0]+caps[0]).upper()
IndexError: string index out of range

Caused by a Pesterchum profile object being created without a handle, which was in turn caused by Pesterchum trying to match a channel mode (+r) with a handle because it was set along with user modes.

2021-08-24 14:35:02,348 - DEBUG - irc - Dummy-1 - handles=('turntechCatnip', 'ChanServ', 'ChanServ')
2021-08-24 14:35:02,348 - DEBUG - irc - Dummy-1 - enumerate(modes) = [(0, '+r'), (1, '+q'), (2, '+a'), (3, '+o')]

Though, perhaps it's not unusual that Pesterchum doesn't handle this correctly? Syntax like:

processCommand mode(('ChanServ!services@services.pesterchum.xyz', '#awh', '+rqao', 'turntechCatnip', 'ChanServ', 'ChanServ'))

doesn't exactly match any examples in https://datatracker.ietf.org/doc/html/rfc1459#section-4.2.3

Dpeta commented 3 years ago

Release is up now, please tell me if this fixes it for you too https://github.com/Dpeta/pesterchum-alt-servers/releases/tag/v2.1.3.1 >:3c

CornBatton commented 3 years ago

it fixed it yeah, i didn't expect such a fast reply and fix honestly, so thanks a bunch for being one of the rare active creators out there