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.

wonder if anyone be so kind as to help

Old posts that have not been replied to for several years.
Locked
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

wonder if anyone be so kind as to help

Post by Callisto »

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
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

try reading tcl-commands.doc, as well as this excellent guide:
suninet tcl guide
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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
 }
}
Locked