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.
$sth = $DBH->prepare( "SELECT nick, host FROM records WHERE nick = lower(?) " );
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.