lib/rubot/connection.rb
# Handle fatal errors from the server.
Handle fatal errors from the server.
Handle fatal errors from the server .
def process_line(line)
		if line =~ /^ERROR/
			@connected = false
			@socket.close
			return
		end
		if line =~ /^PING(.*)/i
			write("PONG#{$1}", true)
			return
		end
		nick, username, host = line.scrape!(/^:(\S+?)!(\S+?)@(\S+?)\s+/)
		if nick
			user = Users[nick]
			user.username = username
			user.host = host
			base_args = [user]
		else
			base_args = []
		end
		server = line.scrape!(/^:(\S+) /)
		sym, args = RegexJump::get_jump(@@inputs, line, base_args)
		if sym
			emit(sym, *args)
		else
		end
	end
def process_line ( line ) if line =~ / ^ERROR / @connected = false @socket . close return end if line =~ / ^PING(.*) /i write ( "PONG#{$1}" , true ) return end nick , username , host = line . scrape! ( / ^:( \S +?)!( \S +?)@( \S +?) \s + / ) if nick user = Users [ nick ] user . username = username user . host = host base_args = [ user ] else base_args = [ ] end server = line . scrape! ( / ^:( \S +)  / ) sym , args = RegexJump :: get_jump ( @@inputs , line , base_args ) if sym emit ( sym , * args ) else end end
Handle fatal errors from the server.
Handle fatal errors from the server .
# Handle pings. # Scrape the user. # FIXME: Don't necessarily add to Users struct if we can't see the user # normally. # Scrape the server. # Unhandled line...
line
<not_specific>