From 9b28df160e736561547440f985c35056d044276e Mon Sep 17 00:00:00 2001 From: Alex Legler Date: Wed, 11 Nov 2009 22:37:07 +0100 Subject: ircbot: Delegate ERR_NOSUCHNICK and ERR_NOSUCHCHANNEL events to plugins --- lib/rbot/message.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/rbot/message.rb') 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 -- cgit v1.2.3