From c71a306e098ecb03915f423a84d39fbe5fd020a0 Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Sun, 9 Mar 2014 19:00:52 +0100 Subject: [PATCH] irc url scraping plugin. --- plugins/scrape.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/scrape.rb diff --git a/plugins/scrape.rb b/plugins/scrape.rb new file mode 100644 index 0000000..9790e21 --- /dev/null +++ b/plugins/scrape.rb @@ -0,0 +1,9 @@ +include EventMachine::IRC::Commands + +Client.register_trigger("PRIVMSG") { |msg| + message = msg[:params][1] + + message.split { |word| + puts word if word ~ /4cdn[.]org/ + } +}