message.rb: fix message addressing logic
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 13 Aug 2008 04:06:33 +0000 (06:06 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 13 Aug 2008 04:06:33 +0000 (06:06 +0200)
commitb6bd9a24014ac9fbc822e9051f216f0506f24cd5
tree1ed6e0da04957ab71cfbf6a446116f79d2429ffe
parent940264d1718b5a32d34ac82276a29f0cc1a51941
message.rb: fix message addressing logic

IRC messages which are not PRIVMSG or NOTICE (i.e. not UserMessage) are
'addressed' to the bot when they originate from it.

Rather than putting this logic in each one of them (and forgetting about
it for some, e.g. NICK messages), put it in BasicUserMessage. Compensate
by always setting @address in UserMessage to test against target
instead.
lib/rbot/message.rb