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.

Writing menu based scripts with TCL/eggdrop

Old posts that have not been replied to for several years.
Locked
G
Guest

Post by Guest »

Hi, I am fairly new to eggdrop (I know IRC a bit and have programmed a few years back with TCL/Expect).

I am trying to see if the following can be done with eggdrop

Create a bot script which provides a menu of choices to the user
e.g
1) Traceroute to servers
2) Check disk free space

The user types '1' or '2' and an appropiate expect script gets launched.

If there is any sample script which can get me started on this path, I'd appreciate it

Regards, Yusuf
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This can be done yes.

It would depend where you wanted the menus displaying (IRC, partyline), but both are just a matter of what bind, and output commands you use.

You would simply output the menu of a given trigger, or possiably a timer.

But within this script, you could setup binds or track a users possition within the tree of menus.

Allthough, I do not know what Expert is! Is it a Tcl extension, or a seperate script interpriter?

If it is a extension of Tcl, is it compatible with eggdrop. IE, does it provide commands, that overwrite other eggdrop comnads and leaving it usless.

If it is seperate, youi would have to use the Tcl "exec" command, and parse the returned string. IE split it at the newline char, and pipe it through puthelp or putdcc.
Locked