summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/ircbot.rb4
-rw-r--r--lib/rbot/message.rb12
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 403f496d..91c383a5 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -615,7 +615,7 @@ class Bot
}
@client[:privmsg] = proc { |data|
- m = PrivMessage.new(self, server, data[:source], data[:target], data[:message])
+ m = PrivMessage.new(self, server, data[:source], data[:target], data[:message], :handle_id => true)
# debug "Message source is #{data[:source].inspect}"
# debug "Message target is #{data[:target].inspect}"
# debug "Bot is #{myself.inspect}"
@@ -629,7 +629,7 @@ class Bot
@plugins.irc_delegate('privmsg', m)
}
@client[:notice] = proc { |data|
- message = NoticeMessage.new(self, server, data[:source], data[:target], data[:message])
+ message = NoticeMessage.new(self, server, data[:source], data[:target], data[:message], :handle_id => true)
# pass it off to plugins that want to hear everything
@plugins.irc_delegate "notice", message
}
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