Skip to content

Instantly share code, notes, and snippets.

@raws
Created March 24, 2010 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raws/342685 to your computer and use it in GitHub Desktop.
Save raws/342685 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "rubygems"
require "summer"
class Bot < Summer::Connection
def channel_message(sender, channel, message)
return unless message =~ /^\.lmgtfy\s+(.+)$/i
privmsg "http://lmgtfy.com/?q=#{URI.escape($1)}", channel
end
end
Bot.new("irc.freenode.net")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment