Subject: Prolog on IRC

From: "Miles, Douglas" <[email-masked]>
Date: Fri, 24 Sep 1999 12:12:57 -0700

Announcing a IRC Bot written for SWI Prolog...

This swi-prolog program.. telnets to eggdrop's console and puppets the
eggdrop as if it was the bot.
I used to create a socket dirrectly to the irc server and not use the
intermediate connection thru the eggdrop... 
But found there is no reason to reinvent the wheel

A current bot is running on #EFNet right now...
his name is "Prolog" and is the channel operator of #ai

my irc nick is "Nephrael"

Session Log From #ai

<nephrael> post("hello")
<Prolog> hello
<nephrael> X is 1+1, post(X)
<Prolog> 2
<nephrael> member(X,[1,2,3]),post(X)
<Prolog> 1
<nephrael> member(X,[1,2,3]),post(X),fail
<Prolog> 1
<Prolog> 2
<Prolog> 3
<nephrael> disp("hello")
<Prolog> [104, 101, 108, 108, 111]
<nephrael> hi :- post(hello).
<nephrael> hi
<Prolog> hello

the first thing the Bot does is look at the user and command the user wishes
to execute
if it is a term or atom it checks to see if the term is executable.. if so
then it makes sure the user has permision to execute it... if not then it
reads it as if it was not executable

non-executable entrys are sent to a dcg parser .. and any thing the user has
defined...
it has the ability to talk to muliple users and interface in a variaty of
ways
for example you can request it to telnets to a machine run a cmd and then
log out...

neph_connect('vast1.com',23,vast1).
neph_read(vast1,X)
X = "login:"
neph_write(vast1,"root"),neph_nl(vast1).

and so on...
you can make it perform CGI queries and return data in a friendly format as
well

i am still very in the middle of completing it at this time.. 
i keep running into like simple problems like .. just a lack of total prolog
programming experiene.

Currently i work for microsoft as a db programmer but so far my program only
runs on unix.. however this weekend i am writing a vb app that will
interface into irc and talk to the Bot .. should be fun.. i will post the
site this monday :)