Browse files

Connect from a thread

  • Loading branch information...
1 parent daea635 commit 1feee75db4af184987709c0af0e297498ee23fbc @lifo committed Sep 2, 2011
Showing with 1 addition and 1,682 deletions.
  1. +1 −1 app/actions/chat_action.rb
  2. +0 −1,681 cadbot.log
View
2 app/actions/chat_action.rb
@@ -27,7 +27,7 @@ def handle_join(message)
message_handler = Proc.new {|event| render encode_json(:message => event.message, :user => event.from, :action => 'message') }
config[:handlers] = {'privmsg' => message_handler}
- @irc = EM.connect(config[:server], config[:port], IRC::Connection, :config => config)
+ Thread.new { @irc = EM.connect(config[:server], config[:port], IRC::Connection, :config => config) }.join
end
def handle_leave
View
1,681 cadbot.log
0 additions, 1,681 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 1feee75

Please sign in to comment.