------art_45735_662401.1187839671831
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 8/23/07, Finn Koch <splitform / gmail.com> wrote:
>
> 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  RCBot.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/.


Can you http://pastie.caboo.se/ your relevant code.  In it's entirety.  I
can't see where in IRCCallback mybot is defined etc.

It would sure help to see these.

Thanx
Daniel

------art_45735_662401.1187839671831--