message handling: improve IRC format handling for received messages
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Jun 2008 15:27:30 +0000 (17:27 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Jun 2008 15:39:39 +0000 (17:39 +0200)
commit46497c5f135079cb26dd9b5ef62e4829f3c49f69
tree785305cd88d90386583f1fa44ad434f582c2d839
parenta2cd248f43fafdd9f385e52403c145f4e5e9fc75
message handling: improve IRC format handling for received messages

Rather than stripping colors all around and keeping other format codes,
we only strip initial and final formatting before parsing the message.

We store the original, unstripped message in #logmessage() and a
fully stripped copy of the message in #plainmessage()

This means that most plugins will now have full formatting of arguments
preserved, while stupid IRC usage of formatting whole lines will not
interfere with bot usage. Plugins that need a fully stripped version of
the message can still access it.
lib/rbot/ircbot.rb
lib/rbot/message.rb