It's about as kludgy as any of my code, as of late. If you notice any obvious errors or inefficiencies, they were probably accidental on my part, since I'm not all that proficient with perl or any of the modules I was using.

The way it works is as follows: there's a main thread and an event-polling thread. I have a separate polling thread because requesting the events page blocks until it has an event. The main thread opens a new chat, and waits for the events thread to get a message (which gets placed in the shared scalar $pending_messages). Once it receives a message, the main thread waits a couple seconds (as if it were reading), generates a response, toggles "typing", "types" for several seconds, and sends it. If the person waited too long to respond initially, then hal disconnects. If the person waited too long to respond after sending a message, hal gives them another chance (by sending another message), and if it times out again, hal disconnects.

Perhaps I should port all of my omegle-specific code to an omegle module. That would make omegle hacking a lot easier...

As for a man-in-the-middle attack, I was actually thinking about doing that, again, for the purpose of logging chats. That's my next project, I think.

Finally, megahal is sort of a confused parrot -- he will respond back with things he had already heard (or mutations thereof). The fact that he turned from an insane encyclopedia into a rude, obscene, horny sexbot says a lot about the internet (or, at least about omegle). The fact that a lot of people seem to consider him human also says a lot about the internet... (or, at least about the turing test).

Too bad I don't have perl compiled with ithreads support. Recompiling everything depending on perl would be a pain. Anyway, good job!

-- Tue Feb 02, 2010 12:39 pm --

I just made a pure python version of that program (using someone elses hal class). The first time after I got it working, it quickly turned gay. Now it seems to have an obsession with "How are you?". Its quite entertaining though.

DamegedSpy wrote:OMG, you are my hero Can you make the Zork bot to send Twitter updates with all messages or at least the ones that get at least 1 point in the game score

I don't know why I'd want to do twitter updates, other than to be obnoxious.

I had a friend who said I should make an rss for this; I think I'll do that... eventually -- set up a cron job that scans through my files and builds an rss file from it.

A lot of people seem to think that zork is just a guy sending the messages, and other people don't have the intelligence/patience to figure out how to play the game. However, this guy actually impressed me... until he reset the game and quit:

odomobo wrote:I have another friend who read through all my hal logs... I think that means I need to fire him up again, with a clean brain.

I haven't yet gotten the persistent brain stuff working yet (mostly because I haven't really put much effort into it), mine starts with only a simple training file every time I run it. For kicks, here are some of my logs: http://66.93.224.121/pub/MyOmegler%20logs/.

odomobo wrote:I have another friend who read through all my hal logs... I think that means I need to fire him up again, with a clean brain.

I haven't yet gotten the persistent brain stuff working yet (mostly because I haven't really put much effort into it), mine starts with only a simple training file every time I run it. For kicks, here are some of my logs: http://66.93.224.121/pub/MyOmegler%20logs/.

I don't know how to make a persistent brain, but you can get a nice initial brain, full of science factoids and poetry and songs here: