Closed Bug 314273 Opened 20 years ago Closed 20 years ago

Various implementations of part and leave break when used with channels with the same name

Categories

(Other Applications Graveyard :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: bugzilla-mozilla-20000923)

Details

(Whiteboard: [cz-0.9.69])

Attachments

(1 file)

1. /leave is broken in general when there's two channels with the same unicodename (possible w/ different charsets and possibly different servers [UNTESTED/THOUGHT ABOUT]). Need to check if e.hasOwnProperty("channelName"). Need to fix join to do the same instead of __proto__ magic. 2. After that fix, /part is still broken because the command manager clones our event object without taking care of the __proto__ chain, which messes up the hasOwnProperty call. Fix that by making clone work correctly with __proto__ stuff. 3. After that fix, Tabclick > Leave #channel is still broken, because getTabContext doesn't use __proto__ like getUserListContext and associates, and breaks our __proto__ chain still. Fix that by mimicking the other implementations. Bug assigned to Silver as per discussion on IRC.
This makes a few interesting changes: - Clone now only clones direct properties + __proto__ on Spidermonkey. - getTabContext now sets up cx.__proto__ as per other get*Context functions. - cmdLeave, cmdNames and cmdJoin make use of hasOwnProperty to check for user-provided data without messing with __proto__ directly. - Some dead code in cmdJoin is removed. This, altogether, fixes the issue of /leave and /part not behaving sensibly if you join two channels with the same Unicode name (but different charsets).
Attachment #201217 - Flags: review?(rginda)
Severity: normal → minor
Status: NEW → ASSIGNED
Attachment #201217 - Flags: review?(rginda) → review?(samuel)
Attachment #201217 - Flags: review?(samuel) → review+
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.69]
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: