root/lang/ruby/misc/tig.rb

Revision 6023, 1.3 kB (checked in by cho45, 17 months ago)

lang/ruby/misc/lig.rb,
lang/ruby/misc/tig.rb,
lang/ruby/misc/wig.rb:

net-irc/examples に入ったやつを削除

tig.rb は twitter からのリンクをそこにしてしまった関係上そのまま

  • Property svn:mime-type set to text/script
  • Property svn:executable set to *
Line 
1#!/usr/bin/env ruby -Ku
2=begin
3
4# tig.rb
5
6Ruby version of TwitterIrcGateway
7( http://www.misuzilla.org/dist/net/twitterircgateway/ )
8
9
10## Install/Run
11
12Now, tig.rb is integrated to net-irc gem. So you can install/run like following:
13
14        $ sudo gem install net-irc
15        $ cd `ruby -rubygems -e 'print Gem.searcher.find("net/irc").full_gem_path+"/examples"'`
16        $ ruby tig.rb # daemonized
17
18You can checkout it from repository.
19
20        $ svn co http://svn.coderepos.org/share/lang/ruby/net-irc/trunk/ net-irc
21        $ cd net-irc
22        $ ruby example/tig.rb
23
24
25## Client opts
26
27Options specified by after irc realname.
28
29Configuration example of Tiarra ( http://coderepos.org/share/wiki/Tiarra ).
30
31        twitter {
32                host: localhost
33                port: 16668
34                name: username@example.com athack
35                password: password on Twitter
36        }
37
38### athack
39
40If `athack` client options specified,
41all nick in join message is leading with @.
42
43So if you complemente nicks (ex. irssi),
44it's good for Twitter like reply command (@nick).
45
46In this case, you will see torrent of join messages after connected,
47because NAMES list can't send @ leading nick (it interpreted op.)
48
49=end
50
51require "rubygems"
52require "net/irc"
53require "rbconfig"
54require "pathname"
55
56ruby = Pathname.new(Config::CONFIG["bindir"]) + Config::CONFIG["RUBY_INSTALL_NAME"]
57path = Pathname.new(Gem.searcher.find("net/irc").full_gem_path) + "examples"
58exec(ruby, path + "tig.rb", *ARGV)
59
Note: See TracBrowser for help on using the browser.