Closed gunnbr closed 7 years ago
One potential fix for this would be to bind the end of the google regex to the end of string using '\s*$' as the last portion of the regex right before the closing quotation mark. This will eat any trailing whitespace, as well as make sure that it only matches if there is a singular word username at the end of the match
For example with the above addition:
"google artificial intelligence for an interesting read" No longer triggers with the google regex.
Whereas:
"google artificial intelligence for DJHenjin
" Will trigger the regex no matter the whitespacing,
The above working example will trigger as response: "DJHenjin: http://lmgtfy.com/?q=artificial intelligence"
Accidentally closed this issue instead of #35.
This issue should be closed as corrected behavior is now exhibited by gthx in IRC channels, may need to retrain users on how to fire the google behavior, but easily enough done.
Closed by a fix from djhenjin at some point in the past.
Gthx should not reply to this unless specifically address. Otherwise phrases like:
"google artificial intelligence for an interesting read"
cause gthx to reply:
"an: http://lmgtfy.com/?q=artificial intelligence"