Skip to content

Instantly share code, notes, and snippets.

@ymendel
Created July 8, 2010 21:54
Show Gist options
  • Save ymendel/468704 to your computer and use it in GitHub Desktop.
Save ymendel/468704 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'cinch'
bot = Cinch.setup do
server 'irc.freenode.org'
nick 'cardroid'
channels %w[#namaste_bitches]
end
p bot.options
bot.run
## output:
## #<OpenStruct prefix="!", nick_suffix="_", realname="Cinch IRC Bot Building Framework", username="cinch", ssl=false, usermode=0, server="irc.freenode.org", password=nil, nick="cardroid", channels=["#namaste_bitches"], port=6667>
## gets on IRC, joins the channel
#!/usr/bin/env ruby
require 'rubygems'
require 'cinch'
bot = Cinch.setup
bot.options.server = 'irc.freenode.org'
bot.options.nick = 'cardroid'
bot.options.channels = %w[#namaste_bitches]
p bot.options
bot.run
## output:
## #<OpenStruct prefix="!", nick_suffix="_", realname="Cinch IRC Bot Building Framework", username="cinch", ssl=false, usermode=0, server="irc.freenode.org", password=nil, nick="cardroid", channels=["#namaste_bitches"], port=6667>
## gets on IRC, does not join channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment