Closed Bug 265863 Opened 20 years ago Closed 20 years ago

Stalk words can be added multiple times

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file, 3 obsolete files)

We should check if a word is already being stalked before adding it to the list
of stalk words or else /unstalk may appear not to work since it only searches
for and removes one instance of a stalk word.
Attached patch patch (obsolete) — Splinter Review
Attachment #163222 - Flags: review?(samuel)
Summary: Stalk words are added multiple times → Stalk words can be added multiple times
Comment on attachment 163222 [details] [diff] [review]
patch

>+    if (notStalkingWord)
>+    {
>+        list.push(e.text);
>+        list.update();
>+    }
> 
>     display(getMsg(MSG_STALK_ADD, e.text));

Is it appropriate to still say "Now stalking foo." when actually the word is
already in the list?
Attached patch alternative patch (obsolete) — Splinter Review
I don't really care since I don't think it's all that important whether the
word was already added. I'd rather save the footprint. Here is an alternative
patch which I think should do what you want though. Unfortunately I haven't
been able to test it because my trunk builds of chatzilla aren't managing to
connect to a server.
I'm sure there's probably a better name than "MSG_ALREADY_STALK_ADD" if someone
wants to suggest one?
Maybe MSG_STALK_USED or MSG_STALK_PRESENT ? Just some suggestions :)
Attachment #163222 - Flags: review?(samuel)
Attached patch new patch (obsolete) — Splinter Review
Okay, here's a new patch. I decided to use MSG_STALKING_ALREADY, but thanks for
the suggestions. :) This patch also alphabetisizes the list of stalk items
before it is displayed to make it easier to see what words you are or aren't
stalking.

Hannibal has kindly offered to test the patch for me since I currently can't do
it myself. I'll request review after that if everything works okay.
Attachment #163222 - Attachment is obsolete: true
Attachment #163415 - Attachment is obsolete: true
Also make sure "word" can't be added if "WORD" is being stalked.
Attachment #166091 - Attachment is obsolete: true
I tested the latest patch which added the case insensitivity (ID 166097).
Everything seems to work as it should.
Attachment #166097 - Flags: review?(samuel)
Attachment #166097 - Flags: review?(samuel) → review+
Silver, can you check this in for me please? If so please used my full email
address in the comment, not jwatt. I.e. p=jonathan.watt@strath.ac.uk
Product: Core → Other Applications
Silver checked in:
http://bonsai.mozilla.org/cvsquery.cgi?who=silver%25warwickcompsoc.co.uk&date=explicit&mindate=2004-11-29+05%3A41&maxdate=2004-11-29+05%3A41
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: