Skip to content

Instantly share code, notes, and snippets.

@ukstudio
Created December 23, 2010 18:23
Show Gist options
  • Save ukstudio/753353 to your computer and use it in GitHub Desktop.
Save ukstudio/753353 to your computer and use it in GitHub Desktop.
# coding: utf-8
require 'rubygems'
require 'net/irc'
class JigokuClient < Net::IRC::Client
def on_rpl_welcome(m)
post JOIN, opts.channel
end
def on_privmsg(m)
channel, message = *m
if message.force_encoding('utf-8') =~ /ミサワ/
post NOTICE, channel, messages.shuffle.first
end
end
def messages
["カチャカチャ・・・ターンッ!",
"マジ飽きわたー ほんと飽きた あれまだやってる奴いるの? ほんと飽きたわー! 俺が一番先に飽きたわー",
"俺の暴走を止められるのはお前と火曜の定期メンテナンスだけだぜ",
"ねぇ、今実行委員呼んでた?"]
end
end
client = JigokuClient.new('irc.freenode.net', 6667,
{:nick => 'jigoku', :user => 'jigoku', :real => 'jigoku',
:channel => '#ukstudio'})
client.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment