summaryrefslogtreecommitdiff
path: root/lib/rbot/message.rb
diff options
context:
space:
mode:
authorAlex Legler <a3li@gentoo.org>2009-11-11 22:37:07 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-12-21 11:05:30 +0100
commit9b28df160e736561547440f985c35056d044276e (patch)
treefc7f664b9206dc309fad2e2a744c5c8aa2d5cb6f /lib/rbot/message.rb
parent1a44fec776e7a299fe4f38298b9a47b443285b3a (diff)
ircbot: Delegate ERR_NOSUCHNICK and ERR_NOSUCHCHANNEL events to plugins
Diffstat (limited to 'lib/rbot/message.rb')
-rw-r--r--lib/rbot/message.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb
index 64c4b6bb..e0cb753c 100644
--- a/lib/rbot/message.rb
+++ b/lib/rbot/message.rb
@@ -661,6 +661,18 @@ module Irc
class PartMessage < JoinMessage
end
+ # class to handle ERR_NOSUCHNICK and ERR_NOSUCHCHANNEL
+ class NoSuchTargetMessage < BasicUserMessage
+ # the channel or nick that was not found
+ attr_reader :target
+
+ def initialize(bot, server, source, target, message='')
+ super(bot, server, source, target, message)
+
+ @target = target
+ end
+ end
+
class UnknownMessage < BasicUserMessage
end
end