From 8a3ef5e5aaf5cb8305728f3bcd407ac17fc23138 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 7 Apr 2008 08:49:36 +0200 Subject: linkbot, remotectl plugins: delegate message() too --- data/rbot/plugins/linkbot.rb | 1 + data/rbot/plugins/remotectl.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'data/rbot') diff --git a/data/rbot/plugins/linkbot.rb b/data/rbot/plugins/linkbot.rb index 670be36d..b50027ec 100644 --- a/data/rbot/plugins/linkbot.rb +++ b/data/rbot/plugins/linkbot.rb @@ -65,6 +65,7 @@ class LinkBot < Plugin # and delegate it to the plugins new_m = PrivMessage.new(@bot, m.server, m.server.user(new_nick), m.target, message) @bot.plugins.delegate "listen", new_m + @bot.plugins.delegate "message", new_m @bot.plugins.privmsg(new_m) if new_m.address? ## Another way is to create a data Hash with source, target and message keys diff --git a/data/rbot/plugins/remotectl.rb b/data/rbot/plugins/remotectl.rb index d6817739..929b07b9 100644 --- a/data/rbot/plugins/remotectl.rb +++ b/data/rbot/plugins/remotectl.rb @@ -19,6 +19,7 @@ class RemoteCtlPlugin < Plugin @bot.auth.login(u, m.source.username, m.source.password) new_m = PrivMessage.new(@bot, @bot.server, u, @bot.myself, s) @bot.plugins.delegate "listen", new_m + @bot.plugins.delegate "message", new_m @bot.plugins.privmsg(new_m) end end -- cgit v1.2.3