From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <018001c0f33f$fb7d5c80$6401a8c0@freeze2k> From: "Matt" To: <9fans@cse.psu.edu> References: <20010612094321.76E9A19A06@mail.cse.psu.edu> <0f8901c0f33c$d5319e40$e8b7c6d4@SOMA> Subject: Re: [9fans] help, i'm in a wet paper bag and I can't get out MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Tue, 12 Jun 2001 14:02:49 +0100 Topicbox-Message-UUID: b5d7b536-eac9-11e9-9e20-41e7f4b1d025 I actually started the ircbot as a way to get to grips with plan9 c. the first one logged in and then spat out the IRC lines on stdout for me to see what was going on. My spawning it with & and doing echo 'PRIVMSG #chann :msg' > /net/tcp/N/data gave me a fully blown client ! which wasn't bad for 10 lines of C I thought. and it (false) dawned on me that maybe that was all the C I had to write. And then after scratching a bit deeper I understood Russ's rlogin script a bit better and saw that I didn't even need my C to do the connection (and that's where I fell into the paper bag). One of the problems the monolithic perl script had was that to add functionality they had to kill the bot, change the script and then log in again. I thought I was able to leverage the namespace feature as a process jail so I could sandbox the evals. In this was to add new commands to the bot all I had to do was add new things to it's namespace. That has been the most disappointing aspect as so much of the checking I've got to do now would have fallen out of having that sandbox. Oh well. I can understand why. Thanks to everyone's suggestions. It's been fun to see everyone's favourite hammer Use python Use Limbo Use C Use awk just about everything but "Use perl" ! I've got everything I need to make it work now I think. Next post from me about it should be the working code. Matt