[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Simple socketing

Knut Mathiesen

7/12/2006 9:31:00 PM

Hi there, I recently started with Ruby and I am trying to make a very
simple irc bot, but I am having some slight problems though.

This is what I came up with:

require 'socket'
class Irc
def connect(server, port = 6667)
@socket = TCPsocket.new(server, port)
end
def to_server(text)
@socket.gets(text)
return true
end
def from_server()
return @socket.puts
end
end
irc = Irc.new
irc.connect("irc.homelien.no", 6667)
irc.to_server('NICK: testbot')
irc.to_server('USER: testbot "" "irc.efnet.net" :testbot')
go = true
while go == true
if (text = irc.from_server)
puts(text)
end
end

--
Posted via http://www.ruby-....

4 Answers

Etta Kenny Teal

3/13/2013 10:32:00 PM

0

Ramon is a foreign transplant originally from Venezuela, probably a
beaner terrorist, and definitely a Fraud. Ramon F Herrera also goes by
"Cambridge Ray," "Google Poster," "Lucius Sanctimonious," and
"Hadron." An ultra-left, open-borders pretend-American. He lives and
works in Houston, TX. Note that when you reply to a Proven Liar you
encourage them to continue lying.

Ramon F Herrera
13313 Cutten Rd, Apt 7102
Houston, TX 77069-2374

[][][][][][]
The DemocRAT Hall Of Shame http://www.democrathallof... asks
"Why do you always LIE?"

[Courtesy of Buster Norris]

On Tue, 8 May 2012 16:34:03 -0700 (PDT), "Ramon F. Herrera"
<ramon@conexus.net> wrote:
>Let us not forget that the owner of ABC is the same owner of Disney:
>Laurene Powell Jobs.

LIAR!!!!!!!!!!!!!!!!!!!!!

ABC is owned by The Walt Disney Company and is part of Disney-ABC
Television Group.
http://en.wikipedia.org/wiki/American_Broadcasti...

Disney-ABC Television Group owned by The Walt Disney Company
http://en.wikipedia.org/wiki/Disney-ABC_Televi...

The Walt Disney Company is NOT privately owned.
Robert A. "Bob" Iger (born February 10, 1951) is an American
businessman and the current chairman and chief executive of The Walt
Disney Company.
http://en.wikipedia.org/wiki/The_Walt_Disn...
http://en.wikipedia.org/wik...

>-Ramon The Faggot Beaner

HAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!

Posted from:
The DemocRATs Hall of Shame!
http://www.democrathallof...

Hell Stomper

3/13/2013 11:45:00 PM

0

On Mar 13, 3:44 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
> On Mar 13, 2:31 pm, Hell Stomper <stardusth...@gmail.com> wrote:
>
> > On Mar 13, 3:16 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
>
> > > We are doing not too shabby lately...
>
> > > -Ramon
>
>  > Who is "we"?
>
> Latinos (aka Hispanics).
>
> -Ramon

I only speak pig Latin...
Well, okay, just pig.
<grunt, grunt>

unknown

3/14/2013 1:15:00 AM

0

"Hell Stomper" wrote in message
news:d9122815-eb49-4155-b6d3-297858226c9a@l16g2000yqe.googlegroups.com...

On Mar 13, 3:44 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
> On Mar 13, 2:31 pm, Hell Stomper <stardusth...@gmail.com> wrote:
>
> > On Mar 13, 3:16 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
>
> > > We are doing not too shabby lately...
>
> > > -Ramon
>
> > Who is "we"?
>
> Latinos (aka Hispanics).
>
> -Ramon

I only speak pig Latin...
Well, okay, just pig.
<grunt, grunt>
======================================================================================================

I don't know Ray. I sure see a lot of Hispanic day laborers standing next
to the street looking for work here in Marin County, Calif. They don't look
to be doing all that well to me.

plainolamerican

3/14/2013 3:28:00 PM

0

On Mar 13, 2:44 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
> On Mar 13, 2:31 pm, Hell Stomper <stardusth...@gmail.com> wrote:
>
> > On Mar 13, 3:16 pm, Ramon F Herrera <gopos...@jonjay.com> wrote:
>
> > > We are doing not too shabby lately...
>
> > > -Ramon
>
>  > Who is "we"?
>
> Latinos (aka Hispanics).
>
> -Ramon

Latinos (aka Hispanics).
---
spic (aka Spanish Person In Custody)