This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

let the bot say something from outside

General support and discussion of Eggdrop bots.
Post Reply
h
hotrs
Voice
Posts: 13
Joined: Tue Apr 03, 2007 2:51 am

let the bot say something from outside

Post by hotrs »

Hi *.*.

Is it possible, e.g. through a shell script, to let the bot say something?

I want to use pisg for generating channel stats, but I can't use a eggdrop script because the bot has no access to the web directory (chroot environment). So my idea was to use a cron job for generating the stats - but I want the bot to say something like "new channel stats at http://...".


greets and thx,
hotrs
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

rosc2112 has written a shell script for pisg that I found very usefull. Seach for "sendftp".

As for the other, a simple announce script should do it; heaps in the archive.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Not the simplest solution but you could probably use netcat or expect to connect to the telnet console on the bot and issue commands from there..

Me, I would just use a tcl script with a time bind, and have my shell/cron script create a flag file when it was done, and then have my tcl script with the time bind look for that flag file and make an announcement when an update was available..
h
hotrs
Voice
Posts: 13
Joined: Tue Apr 03, 2007 2:51 am

Post by hotrs »

Alchera wrote:rosc2112 has written a shell script for pisg that I found very usefull. Seach for "sendftp".

As for the other, a simple announce script should do it; heaps in the archive.
I don't think that works for me: First, perl - and therefore pisg - isn't available in the chroot environment eggdrop is running in. So I can't use a eggdrop script to generate the stats. Second, there is no ftp server running - and I don't plan to install one.

The announce script had to be synchronize with pisg - that's the problem.


greets,
hotrs
h
hotrs
Voice
Posts: 13
Joined: Tue Apr 03, 2007 2:51 am

Post by hotrs »

rosc2112 wrote:Not the simplest solution but you could probably use netcat or expect to connect to the telnet console on the bot and issue commands from there..
Good point. I don't know netcat or expect, but I will have a look.

Me, I would just use a tcl script with a time bind, and have my shell/cron script create a flag file when it was done, and then have my tcl script with the time bind look for that flag file and make an announcement when an update was available..
That was my first idea, too. The shell script which start pigs just create a little text file. A tcl script for the bot just checks periodically for that file, use the text in the file for an announcement and delete the file.


greets,
hotrs
Post Reply