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.

readfile tcl script mod

Old posts that have not been replied to for several years.
Locked
g
ganghiss

readfile tcl script mod

Post by ganghiss »

Since I had no luck trying to contact the author of mc.readfile.tcl (v1.4) I thought someone here might be able to help me with a modifcation. The script reads from a specific file based on a public trigger (ex. !help) and privmsg the contents of the file to the requestor. For every trigger you have a different set line:

set listmc(<trigger>) <filename>.txt

I would like to find a way to modify this to something along these lines:

set listmc(!trigger-<variable>) <variable>.txt

This would allow one set line to cover multiple files/triggers (ex. !channel-help gets help.txt while !channel-rules gets rules.txt).

How might I go about getting this functionality?


-Ganghiss
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

your try is good:
set listmc(!trigger-<variable>) <variable>.txt
g
ganghiss

Post by ganghiss »

set listmc(!trigger-<variable>) <variable>.txt
I think what I am missing here then is what exactly do I write in place of <variable> so I can use just this one set instead of a set line for each trigger/file.
Locked