pwillemann / jircii

Automatically exported from code.google.com/p/jircii
Other
0 stars 0 forks source link

ison, isop, etc. are case-sensitive! #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. I am experiencing the following issue...
ison, isop, and other functions in that family are case-sensitive. A call to 
isop to determine if "XT" is opped in #jIRCii will result in a return value of 
false, even though the user is opped under the alternate-cased nickname "xt".

2. To reproduce it, follow these exact steps:
Call isop ison etc functions from Sleep language

3. The current behavior differs from my expectations, because...

4. I realize you're a volunteer team, I love this program, and I'd love to
help by...
lets code this bitch

Original issue reported on code.google.com by brandon...@gmail.com on 11 Aug 2011 at 7:02

GoogleCodeExporter commented 9 years ago
I'd like to start contributing fixes to this project.  Any 
guidelines/rules/processes I should follow?

Original comment by tric...@gmail.com on 2 Nov 2011 at 2:02

GoogleCodeExporter commented 9 years ago
I believe this file will fix this issue.

It makes any get/put/remove of the Users hashmap key .toLowerCase().

I don't think this will affect anything negatively since scripts/etc should be 
using the nickname from the User object itself, not its key in the Users 
hashmap.

I'm attaching the relevant file for testing (I'm new to this code base 
obviously)

Original comment by tric...@gmail.com on 2 Nov 2011 at 5:54

Attachments:

GoogleCodeExporter commented 9 years ago
attached as .diff per request

Original comment by tric...@gmail.com on 2 Nov 2011 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
removed some redundant .toLowerCase()'s

Original comment by tric...@gmail.com on 2 Nov 2011 at 6:18

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch. Applied in revision 19.

Original comment by rsmu...@gmail.com on 2 Nov 2011 at 6:28

GoogleCodeExporter commented 9 years ago
revision 19 not found; revision 18 was latest, and the patch submitted might 
not be proper in that it would effect more than just the isop, isin etc. 
predecates for the scripting language.

I am therefore bringing this issue back open, and changing Status to "Started", 
and will be implementing a patch. I will also try the patch submitted by 
tricidt and determine what if any other side-effects would occur; if it works 
without any issues, it will be brought in to the code.

Regardless, I'd like to thank tricidt for the effort and the patch.

- Brandon

Original comment by x...@codeslum.org on 17 Dec 2012 at 6:19

GoogleCodeExporter commented 9 years ago
It has been a while but by memory the patch shouldn't negatively affect 
anything, unless you've noticed something already.  I think most irc clients 
treat nicks with no case sensitivity.  The nickname is still stored/saved with 
its original case for anything that would need it that way (such as displaying 
in the nick list/GUI/etc), just any time a script/function calls it, it 
lowercases it for ease.

I guess if a script ever wanted a case perfect copy of the nick for some reason 
that could be a problem?

Either way, easy fix/change, it'd just add another small bit of code to any 
script that doesn't care about case.  I can work on this if you'd like.

Original comment by r...@tricid.net on 19 Dec 2012 at 2:35

GoogleCodeExporter commented 9 years ago
Keeping your patch in for time being, tricid, barring any kind of negative 
consequence it will remain. Thanks for the code!

-Brandon

Original comment by x...@codeslum.org on 21 Dec 2012 at 8:43