examples/echo_bot_celluloid.rb in net-irc2-0.0.12 vs examples/echo_bot_celluloid.rb in net-irc2-0.0.13

- old
+ new

@@ -11,10 +11,16 @@ require 'celluloid/io' class EchoBot < Net::IRC::Client include Celluloid::IO + def initialize(addr,port,opt) + opt[:tcp_socket] = Celluloid::IO::TCPSocket + super + start + end + def on_rpl_welcome(m) post JOIN, "#demo" super end @@ -22,12 +28,12 @@ post NOTICE, m[0], m[1] end end -supervisor = EchoBot.supervise_as :echo_bot, "127.0.0.1", "6667", { +supervisor = EchoBot.supervise_as :echo_bot, "188.40.141.208", "6667", { :nick => "foo", :user => "foo", :real => "foobartest", } -supervisor.actor.start! + sleep