Now I am making some massive assumptions because your question is as vague as hell.
Assumption 1: you are using a largely unmodified chat server
Assumption 2: you are using the web service and chat server on the same host
In this case, you can connect to the chat server using libs sockets and send it this way.
require 'socket' include Socket::Constants socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) sockaddr = Socket.pack_sockaddr_in( 1234, 'localhost' ) socket.connect( sockaddr ) socket.write( "foo\nquit\n" ) puts socket.read socket.close
This will send "foo" to the chat server and then close the connection
Matt rose
source share