Daniel ----- wrote:
> On 8/23/07, Finn Koch <splitform / gmail.com> wrote:
>>       puts "Connecting to #{@server}..."
>> Thanks!
>>
>> upenox
>> --
> 
> 
> Don't access the @conn instance variable directly.
> 
> Use an attr_accessor in the class IRCBot and the just ask for the
> @irc_bot_instance.conn
> 
> HTH
> Daniel

Thanks for the response :)

I have tried this, with no luck.  I have an external file that creates 
the new instance of IRCBot:

mybot = IRCBot.new


I tried referring to it as 'mybot.conn.send("asdf", 0)', but that didn't 
work.

Here is the external file that gets loaded:

class IRCCallback
        def self.check_next( input )
                mybot.conn.send("PRIVMSG matt-mb :hey-o", 0)
                puts "irc callback working"
        end

end

So I guess to sum up, I have mybot.rb which contains the "mybot = 
IRCBot.new", the IRCBot.rb which contains the method in my original 
post, and I have the IRCCallback.rb which gets loaded prior to calling 
the function which in turns calls the method in IRCBot.rb.

Thanks again! :)
-- 
Posted via http://www.ruby-forum.com/.