|
Revision 5939, 316 bytes
(checked in by cho45, 5 years ago)
|
|
lang/ruby/net-irc/trunk,
lang/ruby/net-irc/trunk/examples/client.rb:
Add client example. [new]
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/env ruby |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | $LOAD_PATH << "lib" |
|---|
| 5 | $LOAD_PATH << "../lib" |
|---|
| 6 | |
|---|
| 7 | require "rubygems" |
|---|
| 8 | require "net/irc" |
|---|
| 9 | |
|---|
| 10 | require "pp" |
|---|
| 11 | |
|---|
| 12 | class SimpleClient < Net::IRC::Client |
|---|
| 13 | def initialize(*args) |
|---|
| 14 | super |
|---|
| 15 | end |
|---|
| 16 | end |
|---|
| 17 | |
|---|
| 18 | SimpleClient.new("foobar", "6667", { |
|---|
| 19 | :nick => "foobartest", |
|---|
| 20 | :user => "foobartest", |
|---|
| 21 | :real => "foobartest", |
|---|
| 22 | }).start |
|---|
| 23 | |
|---|