From 410affdb41f01d43498ffe92a12da7979d20053c Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 13 Apr 2008 01:46:46 +0200 Subject: + UnknownMessage class --- lib/rbot/ircbot.rb | 2 ++ lib/rbot/message.rb | 3 +++ 2 files changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 18e9e57c..49459a7f 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -691,7 +691,9 @@ class Bot } @client[:unknown] = proc { |data| #debug "UNKNOWN: #{data[:serverstring]}" + m = UnknownMessage.new(self, server, server, nil, data[:serverstring]) irclog data[:serverstring], ".unknown" + @plugins.delegate "unknown_message", m } set_default_send_options :newlines => @config['send.newlines'].to_sym, diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb index b433bee3..3b2fbc68 100644 --- a/lib/rbot/message.rb +++ b/lib/rbot/message.rb @@ -519,4 +519,7 @@ module Irc # same as a join, but can have a message too class PartMessage < JoinMessage end + + class UnknownMessage < BasicUserMessage + end end -- cgit v1.2.3