jsn / rbot

ruby irc bot (official repo mirror)
http://ruby-rbot.org/
Other
79 stars 36 forks source link

note: store nicks case-insensitive to avoid lost messages issues #9

Closed jaythomas closed 11 years ago

jaythomas commented 11 years ago

Messages get lost if a user leaves a note for someone named "Joejax" instead of "JoeJax", and "JoeJax" will never receive the message and it will just sit in rbot's registry indefinitely. This stores messages case-insensitive in case a user forgot a capital letter in the recipient's nick.

Oblomov commented 11 years ago

Good spotting. Do you think you can add another patch to set to 'downcase' the existing nicks in the registry, making sure to merge notes for the same nick in different cases? (This database 'upgrade' should be coded in a separate method to be called during plugin initialization).

jaythomas commented 11 years ago

Added initialize method. Tested, working on Ruby 1.9.3.

Oblomov commented 11 years ago

Thanks, patches are now upstream.