libomegle is a little C++ (or python with provided bindings) library for interfacing with the 'Omegle' http://omegle.com/ random-pairing instant messaging service.
See the demos, demos/omegle-cli-client.cpp and demos/basic-chatbot.cpp
An example chatlog courtesy of basic-chatbot:
(connected)
Stranger: hi
(Bot): Tell me more
Stranger: wat???
(Bot): I see
Stranger: wat u see???
(Bot): I see
Stranger: ooooo
(Bot): Are you sure?
Stranger: no u r sure...
(Bot): I see
Stranger: r u m/f
(Bot): That's disgusting!
(stranger disconnected)
To build libomegle and the included demos, run make libomegle demos
from the root directory.
To build the python bindings, run make python-bindings
. You will need to have swig and development headers for python (the makefile targets 2.7, but this can be changed).
Alternatively, download a precompiled package.
Install libomegle to /usr/local/: (as root) make install