-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nick/Host lookups should be case-insensitive #11
Comments
I'm not convinced this is the correct behaviour. If we do go this router, I'd suggest having the script run all incoming adds and lookups through a lc() and not having the SQL do the lower(). |
I probably should have just logged the bug and left my kludgy code out of it :-) Please feel free to fix any way you think is best. |
I agree that it should be case-insensitive. IRC itself is case-insensitive when it comes to the protocol, but the display logic preserves case (at least on any IRC server I've ever been on). However, I have seen networks without services where multiple unique users share the same nickname and come and go at different times -- hostnames and the capitalization being the only real differentiating factors. I would side on a two-fold solution:
Correct me if I'm wrong, but I believe the correct syntax for that SQL would be more like: $sth = $DBH->prepare( "SELECT nick, host FROM records WHERE lower(nick) = ?" );
$sth->execute( lc($query) ); |
You're right, that syntax is correct for exact matches, I think I pasted my partial match code section. Oops :) And I agree with the config part, on smaller networks this could be something someone would want although these days I'm "only" on about 4 large ones, all with services. |
Using /nick_lookup is currently case sensitive and fails to find a user when the case is not exact. I have locally kludged this, but don't think this is the best solution.
in _get_hosts_from_nick
$sth = $DBH->prepare( "SELECT nick, host FROM records WHERE nick = lower(?) " );
The text was updated successfully, but these errors were encountered: