diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-29 20:19:41 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-29 20:19:41 +0200 |
commit | 123fc3dd723a044e729341eaedfb8cc75390ac84 (patch) | |
tree | 363b4259836571fc56e8daceb743ca0539568b51 /lib/rbot/ircbot.rb | |
parent | 3c14c9850e03c679541d3a210e6dcdffeb240044 (diff) |
* 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.
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r-- | lib/rbot/ircbot.rb | 4 |
1 files changed, 2 insertions, 2 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 } |