Created
June 12, 2010 13:50
-
-
Save Noxn/435756 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
class Lurker | |
def initialize(channel, server, name) | |
@channel, @server, @name = channel, server, name | |
end | |
def connect | |
#Create socket, send ident, name and other stuff. | |
#Connect to channel. | |
end | |
def start | |
@work = true | |
log | |
end | |
def log | |
while @work | |
#Socket receive and store. | |
#Respond to pings. | |
end | |
end | |
def stop | |
@work = nil | |
#Socket send disconnect message, and disconnect. | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment