From 123fc3dd723a044e729341eaedfb8cc75390ac84 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 29 Jun 2008 20:19:41 +0200 Subject: * fix handling of IDENTIFY_MSG When a server has IDENTIFY-MSG, we would expect identification in any PRIVMSG or NOTICE, even on those generated from the bot. This caused lots of spurious warnings, and would lead to mislogging when a bot-generated message started with + or -. Fix this by only handling IDENTIFY-MSG on server-generated messages. --- lib/rbot/message.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/rbot/message.rb') diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb index 901626ec..6354ea11 100644 --- a/lib/rbot/message.rb +++ b/lib/rbot/message.rb @@ -467,17 +467,17 @@ module Irc # class to manage IRC PRIVMSGs class PrivMessage < UserMessage - def initialize(bot, server, source, target, message) - @msg_wants_id = true - super + def initialize(bot, server, source, target, message, opts={}) + @msg_wants_id = opts[:handle_id] + super(bot, server, source, target, message) end end # class to manage IRC NOTICEs class NoticeMessage < UserMessage - def initialize(bot, server, source, target, message) - @msg_wants_id = true - super + def initialize(bot, server, source, target, message, opts={}) + @msg_wants_id = opts[:handle_id] + super(bot, server, source, target, message) end end -- cgit v1.2.3