# Ruby Bot

**URL:** <https://rubytalk.org/t/ruby-bot/1265>\
**Category:** ruby-talk\
**Created:** [18 August 2002 22:04 UTC](https://rubytalk.org/t/ruby-bot/1265 "2002-08-18T22:04:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [18 August 2002 22:04 UTC](https://rubytalk.org/t/ruby-bot/1265/1 "2002-08-18T22:04:33Z")

</div>

Hello,

did anybody manage to use rbot on Win32 platforms?

> **···**
>
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Charles\_Blackburn1](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@Charles\_Blackburn1](https://rubytalk.org/u/Charles_Blackburn1)\
**Post date:** [19 August 2002 01:43 UTC](https://rubytalk.org/t/ruby-bot/1265/2 "2002-08-19T01:43:22Z")

</div>

not under windows but it runs fine under linux… i’ve even made a  
couple of plugins (which i’ve subsequently lost 🙂 )

what sort of errors u getting? i’m gonna be installing ruby on my works  
machine this week and i was gonna give rbot a whirl

regards  
charles

> **···**
>
> On Sun, 2002-08-18 at 23:04, Giuseppe Bilotta wrote:
> 
> > Hello,
> > 
> > did anybody manage to use rbot on Win32 platforms?
> > 
> > –  
> > Giuseppe “Oblomov” Bilotta
> > 
> > Axiom I of the Giuseppe Bilotta  
> > theory of IT:  
> > Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [19 August 2002 10:08 UTC](https://rubytalk.org/t/ruby-bot/1265/3 "2002-08-19T10:08:04Z")

</div>

Well, with rbot 0.9.4 there was an error about SIGHUP not being a  
recognized command (commenting the trap line solved it), but it  
wouldn’t connect.

Then it looked for /etc/hosts (this is probably a problem with the  
HTTP packages?)

And even when creating this file it failed by saying that the  
required address was not valid for its context.

I’ve not tried 0.9.6 now because I need to put upt the bdb Ruby  
module.

The Resident Drunk wrote:

> **···**
>
> > not under windows but it runs fine under linux… i’ve even made a  
> > couple of plugins (which i’ve subsequently lost 🙂 )
> > 
> > what sort of errors u getting? i’m gonna be installing ruby on my works  
> > machine this week and i was gonna give rbot a whirl
> > 
> > regards  
> > charles  
> > On Sun, 2002-08-18 at 23:04, Giuseppe Bilotta wrote:
> > 
> > > Hello,
> > > 
> > > did anybody manage to use rbot on Win32 platforms?
> 
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Charles\_Blackburn1](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@Charles\_Blackburn1](https://rubytalk.org/u/Charles_Blackburn1)\
**Post date:** [19 August 2002 21:01 UTC](https://rubytalk.org/t/ruby-bot/1265/4 "2002-08-19T21:01:42Z")

</div>

> Well, with rbot 0.9.4 there was an error about SIGHUP not being a  
> recognized command (commenting the trap line solved it), but it  
> wouldn’t connect.

Well SIGHUP isn’t a commmand par se… it’s a unix termination signal  
that u can send to the program to tell it to terminate.

> Then it looked for /etc/hosts (this is probably a problem with the  
> HTTP packages?)  
> again this is unix specific… in windows it’s in c:\windows\lmhosts  
> iirc. /etc/hosts hold the ip ↔ name solution lijnes for machines that  
> are on your local network usually as I have indicated below.

192.168.0.1 [firewall.summerfield-technology.co.uk](http://firewall.summerfield-technology.co.uk) fw  
192.168.0.2 [dev.summerfield-technology.co.uk](http://dev.summerfield-technology.co.uk) dev  
etc  
etc

> And even when creating this file it failed by saying that the  
> required address was not valid for its context.

What i’m going to do is if i get time tonight i’m going to d/l ruby for  
windows and rbot (again 🙂 ) and i’ll have a go… I’ll keep you all  
posted as to how i get on.

regards  
Charles

> **···**
>
> On Mon, 2002-08-19 at 11:08, Giuseppe Bilotta wrote:

---

<div class="post-metadata">

**Author:** ![Rick\_Rezinas](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Rick\_Rezinas](https://rubytalk.org/u/Rick_Rezinas)\
**Post date:** [19 August 2002 21:47 UTC](https://rubytalk.org/t/ruby-bot/1265/5 "2002-08-19T21:47:43Z")

</div>

HUP is actually a hangup, generally used to reload a process rather tan  
terminate (TERM) it.

rick

> **···**
>
> The Resident Drunk ([charlesb@summerfield-technology.co.uk](mailto:charlesb@summerfield-technology.co.uk)) wrote:
> 
> > On Mon, 2002-08-19 at 11:08, Giuseppe Bilotta wrote:
> > 
> > > Well, with rbot 0.9.4 there was an error about SIGHUP not being a  
> > > recognized command (commenting the trap line solved it), but it  
> > > wouldn’t connect.
> > 
> > Well SIGHUP isn’t a commmand par se… it’s a unix termination signal  
> > that u can send to the program to tell it to terminate.

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [20 August 2002 00:09 UTC](https://rubytalk.org/t/ruby-bot/1265/6 "2002-08-20T00:09:12Z")

</div>

The Resident Drunk wrote:

> > Well, with rbot 0.9.4 there was an error about SIGHUP not being a  
> > recognized command (commenting the trap line solved it), but it  
> > wouldn’t connect.
> 
> Well SIGHUP isn’t a commmand par se… it’s a unix termination signal  
> that u can send to the program to tell it to terminate.

Yes, sorry.

> > Then it looked for /etc/hosts (this is probably a problem with the  
> > HTTP packages?)  
> > again this is unix specific… in windows it’s in c:\windows\lmhosts  
> > iirc. /etc/hosts hold the ip ↔ name solution lijnes for machines that  
> > are on your local network usually as I have indicated below.
> 
> 192.168.0.1 [firewall.summerfield-technology.co.uk](http://firewall.summerfield-technology.co.uk) fw  
> 192.168.0.2 [dev.summerfield-technology.co.uk](http://dev.summerfield-technology.co.uk) dev  
> etc  
> etc

Can I just copy the windows one to where linux expects it?

> > And even when creating this file it failed by saying that the  
> > required address was not valid for its context.
> 
> What i’m going to do is if i get time tonight i’m going to d/l ruby for  
> windows and rbot (again 🙂 ) and i’ll have a go… I’ll keep you all  
> posted as to how i get on.

Thank you very much.

> **···**
>
> > On Mon, 2002-08-19 at 11:08, Giuseppe Bilotta wrote:
> 
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Charles\_Blackburn1](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@Charles\_Blackburn1](https://rubytalk.org/u/Charles_Blackburn1)\
**Post date:** [21 August 2002 21:22 UTC](https://rubytalk.org/t/ruby-bot/1265/7 "2002-08-21T21:22:41Z")

</div>

No but if ythe program isn’t written to handle the SIGHUP signal, then  
the default handler will terminate the process. but i agree normally  
it’s used to get the program to reload it’s config or whatever.

regards  
charles

> **···**
>
> On Mon, 2002-08-19 at 22:47, Rick Rezinas wrote:
> 
> > > Well SIGHUP isn’t a commmand par se… it’s a unix termination signal  
> > > that u can send to the program to tell it to terminate.
> > 
> > HUP is actually a hangup, generally used to reload a process rather tan  
> > terminate (TERM) it.
> > 
> > rick

---

<div class="post-metadata">

**Author:** ![Charles\_Blackburn1](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@Charles\_Blackburn1](https://rubytalk.org/u/Charles_Blackburn1)\
**Post date:** [21 August 2002 21:24 UTC](https://rubytalk.org/t/ruby-bot/1265/8 "2002-08-21T21:24:20Z")

</div>

> > again this is unix specific… in windows it’s in c:\windows\lmhosts  
> > iirc. /etc/hosts hold the ip ↔ name solution lijnes for machines that  
> > are on your local network usually as I have indicated below.
> > 
> > 192.168.0.1 [firewall.summerfield-technology.co.uk](http://firewall.summerfield-technology.co.uk) fw  
> > 192.168.0.2 [dev.summerfield-technology.co.uk](http://dev.summerfield-technology.co.uk) dev  
> > etc  
> > etc
> 
> Can I just copy the windows one to where linux expects it?  
> I would presume so the two files are exactly the same iirc

or you could just modify the code to look in \windows if it’s running  
under win etc but i don’t know what else u would need to change

> > > And even when creating this file it failed by saying that the  
> > > required address was not valid for its context.
> > 
> > What i’m going to do is if i get time tonight i’m going to d/l ruby for  
> > windows and rbot (again 🙂 ) and i’ll have a go… I’ll keep you all  
> > posted as to how i get on.
> 
> Thank you very much.  
> np, i haven’t had time to do it yet 😉 but it’s on my list of things to  
> do. I’m trying to rewrite a yahoo chat client atm… and yes it’s in  
> ruby 🙂

regards  
charles

> **···**
>
> On Tue, 2002-08-20 at 01:09, Giuseppe Bilotta wrote:

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [22 August 2002 00:54 UTC](https://rubytalk.org/t/ruby-bot/1265/9 "2002-08-22T00:54:26Z")

</div>

The Resident Drunk wrote:

> **···**
>
> > On Tue, 2002-08-20 at 01:09, Giuseppe Bilotta wrote:
> > 
> > > > again this is unix specific… in windows it’s in c:\windows\lmhosts  
> > > > iirc. /etc/hosts hold the ip ↔ name solution lijnes for machines that  
> > > > are on your local network usually as I have indicated below.
> > > > 
> > > > 192.168.0.1 [firewall.summerfield-technology.co.uk](http://firewall.summerfield-technology.co.uk) fw  
> > > > 192.168.0.2 [dev.summerfield-technology.co.uk](http://dev.summerfield-technology.co.uk) dev  
> > > > etc  
> > > > etc
> > > 
> > > Can I just copy the windows one to where linux expects it?  
> > > I would presume so the two files are exactly the same iirc
> > 
> > or you could just modify the code to look in \windows if it’s running  
> > under win etc but i don’t know what else u would need to change
> 
> Still aborts saying that the requested address was not valid for the  
> context.
> 
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [23 August 2002 22:19 UTC](https://rubytalk.org/t/ruby-bot/1265/10 "2002-08-23T22:19:28Z")

</div>

Giuseppe Bilotta wrote:

> Still aborts saying that the requested address was not valid for the  
> context.

I upgraded to 0.9.6 but still the same error. I don’t even understand  
_who_ is giving the error …

> **···**
>
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Tom\_Gilbert](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@Tom\_Gilbert](https://rubytalk.org/u/Tom_Gilbert)\
**Post date:** [23 August 2002 23:00 UTC](https://rubytalk.org/t/ruby-bot/1265/11 "2002-08-23T23:00:21Z")

</div>

Sounds like the socket libraries. Wanna paste the entire text of the  
error?

Tom.

> **···**
>
> - Giuseppe Bilotta ([bilotta78@hotpop.com](mailto:bilotta78@hotpop.com)) wrote:
> 
> > Giuseppe Bilotta wrote:
> > 
> > > Still aborts saying that the requested address was not valid for the  
> > > context.
> > 
> > I upgraded to 0.9.6 but still the same error. I don’t even understand  
> > _who_ is giving the error …
> 
> –  
> .^. .-------------------------------------------------------.  
> /V\ | Tom Gilbert, London, England | [http://linuxbrit.co.uk](http://linuxbrit.co.uk) |  
> /( )\ | Open Source/UNIX consultant | [tom@linuxbrit.co.uk](mailto:tom@linuxbrit.co.uk) |  
> ^^-^^ `-------------------------------------------------------’

---

<div class="post-metadata">

**Author:** ![Rich1](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Rich1](https://rubytalk.org/u/Rich1)\
**Post date:** [23 August 2002 23:09 UTC](https://rubytalk.org/t/ruby-bot/1265/12 "2002-08-23T23:09:32Z")

</div>

I know the title might sound a bit OT, but the point is I’m going to do it  
in Ruby… so…

I’m wondering how I would - start a SWF file from Ruby but not let the SWF  
file have a normal window border… no title bar, no menu options - not  
even a close button in the upper right corner…

When you double-click on a SWF it opens up in MM’s SWF Player - with a  
normal windows border.

I don’t want the border… am I being too picky - or can Ruby really handle  
this?

I would love any help or suggestions you guys can give me about this…

-Rich

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [23 August 2002 23:39 UTC](https://rubytalk.org/t/ruby-bot/1265/13 "2002-08-23T23:39:37Z")

</div>

Tom Gilbert wrote:

> > Giuseppe Bilotta wrote:
> > 
> > > Still aborts saying that the requested address was not valid for the  
> > > context.
> > 
> > I upgraded to 0.9.6 but still the same error. I don’t even understand  
> > _who_ is giving the error …
> 
> Sounds like the socket libraries. Wanna paste the entire text of the  
> error?

C:\TOOLS\net\rbot-0.9.6\>rbot  
…/rbot/ircbot.rb:240:in `connect': failed to connect to IRC server at irc.azzurra.net 6667: The requested address is not valid in its context. - "connect(2)" (RuntimeError) from ./rbot/ircbot.rb:252:in `mainloop’  
from C:\TOOLS\net\rbot-0.9.6\rbot.rb:62

C:\TOOLS\net\rbot-0.9.6\>

> **···**
>
> > - Giuseppe Bilotta ([bilotta78@hotpop.com](mailto:bilotta78@hotpop.com)) wrote:
> 
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Bilotta](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@Giuseppe\_Bilotta](https://rubytalk.org/u/Giuseppe_Bilotta)\
**Post date:** [24 August 2002 12:20 UTC](https://rubytalk.org/t/ruby-bot/1265/14 "2002-08-24T12:20:20Z")

</div>

Giuseppe Bilotta wrote:

> Tom Gilbert wrote:
> 
> > > Giuseppe Bilotta wrote:
> > > 
> > > > Still aborts saying that the requested address was not valid for the  
> > > > context.
> > > 
> > > I upgraded to 0.9.6 but still the same error. I don’t even understand  
> > > _who_ is giving the error …
> > 
> > Sounds like the socket libraries. Wanna paste the entire text of the  
> > error?
> 
> C:\TOOLS\net\rbot-0.9.6\>rbot  
> ./rbot/ircbot.rb:240:in `connect': failed to connect to IRC server at irc.azzurra.net 6667: The requested address is not valid in its context. - "connect(2)" (RuntimeError) from ./rbot/ircbot.rb:252:in `mainloop’  
> from C:\TOOLS\net\rbot-0.9.6\rbot.rb:62
> 
> C:\TOOLS\net\rbot-0.9.6\>

Ok. /etc/host MUST contain the reverse DNS for the server. If it  
contains

213.203.143.52 [irc.azzurra.net](http://irc.azzurra.net)

rbot manages to connect.

> **···**
>
> > > - Giuseppe Bilotta ([bilotta78@hotpop.com](mailto:bilotta78@hotpop.com)) wrote:
> 
> –  
> Giuseppe “Oblomov” Bilotta
> 
> Axiom I of the Giuseppe Bilotta  
> theory of IT:  
> Anything is better than MS
