Closed Bug 291149 Opened 20 years ago Closed 20 years ago

Events don't have a msg property set, making them hard to match in hook patterns

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

Details

(Whiteboard: [cz-patch][cz-0.9.68.2])

Attachments

(1 file, 1 obsolete file)

Currently, ChatZilla does not store the contents of PRIVMSG or NOTICE messages on an event. This would be very useful when hooking specific kinds of messages. Right now, someone who would want to do that has no choice but to hook *all* PRIVMSG or NOTICE messages and match the message later on, or use complicated lambda functions. I believe minimal modifications should make it possible to store the message in e.msg to make it available for matching by hook patterns.
Assignee: rginda → gijskruitbosch
Attached patch Patch v1 (obsolete) — Splinter Review
Patch to add e.msg in onNotice and onPrivmsg. We can't do it earlier because we are not sure of the target (and thus not sure of the character encoding we should use)
Attachment #181295 - Flags: review?(silver)
Comment on attachment 181295 [details] [diff] [review] Patch v1 >Index: mozilla/extensions/irc/js/lib/irc.js >+ e.msg = e.decodeParam(2, e[e.set]); Is there something wrong with e.replyTo as the 2nd param? :) > else > e.destObject = e.replyTo; > >+ if (e.set != "server") >+ e.msg = e.decodeParam(2, e[e.set]); Why not put it in the else part above?
Attached patch Patch v2Splinter Review
Maybe next time I ought to not give the patch a version number. It sparks off the wrong ideas ;-).
Attachment #181295 - Attachment is obsolete: true
Attachment #181298 - Flags: review?(silver)
Attachment #181295 - Flags: review?(silver) → review-
Attachment #181298 - Flags: review?(silver) → review+
Whiteboard: cz-patch
Attachment #181298 - Flags: approval1.8b2?
Summary: Event don't have a msg property set, making them hard to match in hook patterns → Events don't have a msg property set, making them hard to match in hook patterns
Comment on attachment 181298 [details] [diff] [review] Patch v2 a=asa
Attachment #181298 - Flags: approval1.8b2? → approval1.8b2+
Checked in --> FIXED. Automated builds at http://twpol.dyndns.org/mozilla/chatzilla/nightly/ will include this shortly.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: cz-patch → [cz-patch][cz-0.9.68.2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: