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.
Old posts that have not been replied to for several years.
Callisto
Halfop
Posts: 86 Joined: Sun Mar 13, 2005 11:04 am
Post
by Callisto » Sun Mar 13, 2005 2:28 pm
Hi I am very new to tcl so any help would be appreciated.
I would like help or be pointed in the right direction regarding making a script.The script I would like is one where a trigger can be used in public or msg like !help or /msg botnick help and it would play a text file back to the nick.
Any help appreciated and many thanks
YooHoo
Owner
Posts: 939 Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast
Post
by YooHoo » Sun Mar 13, 2005 3:30 pm
try reading tcl-commands.doc, as well as this excellent guide:
suninet tcl guide
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sun Mar 13, 2005 3:40 pm
Code: Select all
set filename "help.txt"
bind pub - !help help
proc help {nick uhost hand chan text} {
if ![file exists $::filename] {
putserv "NOTICE $nick :Error: Can't find $::filename."
} {
set id [open $::filename]
while {![eof $id]} {
puthelp "PRIVMSG $nick :[gets $id]"
}
close $id
}
}