Created
          December 23, 2010 18:23 
        
      - 
      
- 
        Save ukstudio/753353 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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