From DMiles@keanesea.com  Fri Sep 24 21:21:21 1999
Received: from seahd2.keanesea.com (mta.keanesea.com [207.175.79.17])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id VAA28925
	for <prolog@swi.psy.uva.nl>; Fri, 24 Sep 1999 21:21:20 +0200 (MET DST)
Received: by SEAHD2 with Internet Mail Service (5.0.1461.28)
	id <PMDMX7YG>; Fri, 24 Sep 1999 12:19:47 -0700
Message-ID: <41125BB0CE9CD111BA9200A02480781EBBC629@SEA-EXCH1>
From: "Miles, Douglas" <DMiles@keanesea.com>
To: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Prolog on IRC
Date: Fri, 24 Sep 1999 12:12:57 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1461.28)
Content-Type: text/plain

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 :)


