Skip to content

Instantly share code, notes, and snippets.

@gregimba
Created August 20, 2013 05:45
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 gregimba/6277496 to your computer and use it in GitHub Desktop.
Save gregimba/6277496 to your computer and use it in GitHub Desktop.
require 'daemons'
require 'cinch'
bot = Cinch::Bot.new do
configure do |c|
c.nick = "gregimba_bot"
c.server = "irc.oftc.net"
c.channels = ["#gregimba"]
end
on :message do |m|
open("/Users/grant/Documents/Code/logs.txt", "a") do |file|
file.puts "#{m.user.nick} => #{m.message}"
end
end
end
Daemons.daemonize
bot.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment